---
title: "Deploy torchcode"
description: "A self-hosted, JupyterLab-based PyTorch interview practice platform"
category: "AI/ML"
url: https://railway.com/deploy/torchcode
---

# Deploy torchcode

A self-hosted, JupyterLab-based PyTorch interview practice platform

**[Deploy torchcode on Railway](https://railway.com/template/torchcode)**

- **Creator:** kmaki's Projects
- **Category:** AI/ML

## Template content

### torchcode

- **Image:** ghcr.io/duoan/torchcode:0.1.1
- **Public domain:** Yes

## Documentation

# Deploy and Host TorchCode on Railway

## About Hosting

[TorchCode](https://github.com/duoan/TorchCode) is a self-hosted, JupyterLab-based coding practice platform focused on PyTorch interview questions. It includes 40 curated notebook problems, built-in judging (`torch_judge`), hints, and progress tracking.

TorchCode runs as a single container using the upstream image from GHCR. The app serves JupyterLab over HTTP and stores progress in a JSON file. For Railway hosting, you only need one app service with a persistent volume mounted to `/app/data`.

## Why Deploy

- **PyTorch interview practice at your own pace** — solve common operator and architecture coding questions in a structured environment.
- **Self-hosted and private** — your notebooks and progress stay in your own Railway project.
- **Single-service deployment** — no database or cache required.
- **Instant feedback loop** — run checks, get hints, and track solve history directly in notebooks.
- **Upstream image support** — deploy from official `ghcr.io/duoan/torchcode` image with minimal config.

## Common Use Cases

- **ML interview prep** — practice implementing softmax, attention, normalization, and Transformer components from scratch.
- **Team study environment** — spin up an internal shared TorchCode instance for interview training.
- **Hands-on PyTorch learning** — use guided notebooks with correctness checks instead of passive reading.
- **Reusable coding drills** — reset notebook templates and repeat timed attempts.

## Dependencies for Deployment

### Deployment Dependencies

| Dependency | Details |
|---|---|
| **Docker Image** | `ghcr.io/duoan/torchcode:0.1.1` (pinned upstream image) |
| **Exposed Port** | `8888` (JupyterLab HTTP service) |
| **Persistent Volume** | Mount to `/app/data` (stores progress file and persistent data) |
| **`PORT`** | Required; set to `8888` |
| **`PROGRESS_PATH`** | Required; set to `/app/data/progress.json` for durable progress |
| **External Database** | None |
| **Public Domain** | Railway-provided domain works out of the box; `/` redirects to JupyterLab UI |



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/torchcode
