Skip to content

Commit 80a6822

Browse files
committed
cpu only
1 parent df67738 commit 80a6822

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Build & Publish Docker Image
22

33
on:
4-
54
pull_request:
65
branches: [ docker ]
76
paths:
@@ -36,15 +35,6 @@ jobs:
3635
- uses: docker/setup-qemu-action@v3 # multi-arch emulation
3736
- uses: docker/setup-buildx-action@v3 # Buildx driver with cache support
3837

39-
# # -------- optional, but speeds repeat builds -----------
40-
# - name: Restore Docker layer cache
41-
# uses: actions/cache@v4
42-
# with:
43-
# path: /tmp/.buildx-cache
44-
# key: ${{ runner.os }}-buildx-${{ github.sha }}
45-
# restore-keys: ${{ runner.os }}-buildx-
46-
# # --------------------------------------------------------
47-
4838
- name: Log in to GHCR
4939
uses: docker/login-action@v3
5040
with:
@@ -62,5 +52,3 @@ jobs:
6252
tags: |
6353
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
6454
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
65-
# cache-from: type=local,src=/tmp/.buildx-cache
66-
# cache-to: type=local,dest=/tmp/.buildx-cache,mode=max

docker/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ USER ${NB_UID}
1313
WORKDIR /home/jovyan/work
1414
COPY .. .
1515

16+
# ---------- ensure correct ownership ---------------------------------------------
17+
USER root
18+
RUN chown -R ${NB_UID}:${NB_GID} /home/jovyan/work
19+
USER ${NB_UID}
20+
1621
# ---------- extra Python deps -----------------------------------------------------
17-
# CPU wheels only
22+
# CPU-only PyTorch (wheels from CPU index)
1823
RUN pip install --no-cache-dir \
1924
torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0 \
2025
--index-url https://download.pytorch.org/whl/cpu

docker/README.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,48 @@ Works on Intel & Apple-Silicon Macs, Linux ×86_64 & ARM64.
2323

2424

2525
---
26-
## General use
26+
## Quick Start
2727

28-
### 1. Pull the latest image
28+
### Open Docker Desktop
2929

30-
```bash
30+
### Pull the Latest Image
31+
32+
```
3133
docker pull ghcr.io/deeptrackai/deep-learning-crash-course:latest
3234
```
3335
Docker will automatically select the correct architecture slice (amd64 or arm64).
3436

35-
### 2. Run JupyterLab
37+
38+
### Startup Docker Image
39+
3640
```docker run --rm -it \
3741
-p 8888:8888 \
38-
-v "$(pwd)":/home/jovyan/work \
39-
ghcr.io/deeptrackai/deep-learning-crash-course:latest
40-
```
41-
After startup you’ll see a URL with a token (e.g. http://127.0.0.1:8888/lab?token=…). Paste it into your browser.
42+
ghcr.io/deeptrackai/deep-learning-crash-course:latest```
4243
4344
---
4445
45-
## Use in VS Code (Dev Containers)
46+
### Open in JupyterLab
47+
48+
After startup, you’ll see a URL with a token (e.g. http://127.0.0.1:8888/lab?token=…). Paste it into your browser. You'll see the full set of Crash Course notebooks.
49+
50+
---
4651
47-
### 1. Install the “Dev Containers” extension in VS Code.
52+
### Open in VS Code (Dev Containers)
4853
49-
### 2. Command Palette → Dev Containers: Open Folder in Container…
54+
After startup, in VS Code (with Dev Containers installed):
55+
56+
1. Open the Command Palette.
5057
51-
### 3. Select your local DeepLearningCrashCourse folder.
58+
2. Run ```Dev Containers: Attach to Running Container...```.
5259
53-
### 4. In the new window:
60+
3. Select your container, a new VS Code window will pop up.
5461
55-
- Install Python & Jupyter extensions when prompted.
62+
4. In the new window:
5663
57-
- Open Folder → /home/jovyan/work (the repo inside the container).
64+
- Install Python & Jupyter extensions when prompted.
5865
59-
- Select Interpreter in the bottom bar → the one at `/opt/conda/bin/python` (Python 3.11).
66+
- Open Folder → /home/jovyan/work (the repo inside the container).
6067
61-
### 5. Use the integrated terminal (`Ctrl`+``) or Run & Debug scripts (F5).
68+
- Select Interpreter in the bottom bar → the one at `/opt/conda/bin/python` (Python 3.11).
6269
63-
### 6. Open any `.ipynb` and run cells.
70+
5. Open any `.ipynb` and run cells.

0 commit comments

Comments
 (0)