You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.**Install VSCode Command Line Interface (Optional)**
58
-
59
-
This step is required if you plan to create a remote tunnel. First, install the [Remote Tunnels](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-server) extension in VSCode.
50
+
First, install the [Remote Tunnels](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-server) extension in VSCode.
60
51
61
-
3.**Connect to compute resources**
52
+
2.**Connect to compute resources**
62
53
63
54
For CPU resources:
64
55
```bash
@@ -70,14 +61,16 @@ Choose one of the following methods to set up your environment:
To open a tunnel to connect you local VSCode to the container on the cluster:
66
+
To open a tunnel to connect your local VSCode to the container on the cluster:
76
67
```bash
77
68
apptainer run --nv --writable-tmpfs oras://ghcr.io/marvinsxtr/ml-project-template:latest-sif code tunnel
78
69
```
79
70
80
-
In VSCode press `Shift+Alt+P` (Windows/Linux) or `Shift+Cmd+P` (Mac), type connect to tunnel, select GitHub and select your named node on the cluster. Your IDE is now connected to the cluster.
71
+
> 💡 You can specify a version tag (e.g., `v0.0.1`) instead of `latest`. Available versions are listed at [GitHub Container Registry](https://github.com/marvinsxtr/ml-project-template/pkgs/container/ml-project-template).
72
+
73
+
In VSCode press `Shift+Alt+P` (Windows/Linux) or `Shift+Cmd+P` (Mac), type "connect to tunnel", select GitHub and select your named node on the cluster. Your IDE is now connected to the cluster.
81
74
82
75
To open a shell in the container on the cluster:
83
76
```bash
@@ -86,29 +79,30 @@ Choose one of the following methods to set up your environment:
86
79
87
80
> 💡 This may take a few minutes on the first run as the container image is downloaded.
88
81
89
-
### Option 2: Docker
82
+
### Option 2: Docker (Local Machine)
90
83
91
-
Run the container directly with:
84
+
1.**Install VSCode Dev Containers Extension**
92
85
93
-
```bash
94
-
docker run -it --rm --platform=linux/amd64 ghcr.io/marvinsxtr/ml-project-template:latest /bin/bash
95
-
```
86
+
First, install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension in VSCode.
96
87
97
-
> 💡 You can specify a version tag (e.g., `v0.0.1`) instead of `latest`. Available versions are listed at [GitHub Container Registry](https://github.com/marvinsxtr/ml-project-template/pkgs/container/ml-project-template).
88
+
2.**Open the Repository in the Dev Container**
89
+
90
+
Click the `Reopen in Container` button in the pop-up that appears once you open the repository in VSCode.
91
+
92
+
Alternatively, open the command palette in VSCode by pressing `Shift+Alt+P` (Windows/Linux) or `Shift+Cmd+P` (Mac), and type `Dev Containers: Reopen in Container`.
98
93
99
94
## 📦 Package Management
100
95
101
96
This project uses [uv](https://docs.astral.sh/uv/) for Python dependency management.
102
97
103
98
### Adding or Updating Dependencies
104
99
105
-
Inside the container (e.g., [VSCode shell with Docker Container](https://code.visualstudio.com/docs/devcontainers/containers)):
106
-
100
+
Inside the container:
107
101
```bash
108
102
# Add a specific package
109
103
uv add <package-name>
110
104
111
-
# Update all dependencies from pyproject.toml or requirements.txt
105
+
# Update all dependencies from pyproject.toml
112
106
uv sync
113
107
```
114
108
@@ -173,6 +167,12 @@ Test your Dockerfile locally before pushing:
173
167
docker buildx build -t ml-project-template .
174
168
```
175
169
170
+
Run the container directly with:
171
+
172
+
```bash
173
+
docker run -it --rm --platform=linux/amd64 ml-project-template /bin/bash
174
+
```
175
+
176
176
## 🧪 Running Experiments
177
177
178
178
### WandB Logging
@@ -187,31 +187,71 @@ WANDB_ENTITY=your_entity
187
187
WANDB_PROJECT=your_project_name
188
188
```
189
189
190
-
### Local Execution
190
+
### Example Project
191
191
192
-
Run a script locally with:
192
+
The folder `src/example` contains an example project which can serve as a starting point for ML experimentation. Configuring a function
0 commit comments