Skip to content

Commit 625d6ca

Browse files
committed
cpu and gpu
1 parent c17827e commit 625d6ca

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docker/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ WORKDIR /home/jovyan/work
1414
RUN git clone --depth 1 https://github.com/DeepTrackAI/DeepLearningCrashCourse.git .
1515

1616
# ---------- ensure correct ownership ---------------------------------------------
17-
USER root
18-
RUN chown -R ${NB_UID}:${NB_GID} /home/jovyan/work
19-
USER ${NB_UID}
17+
USER root
18+
RUN chown -R ${NB_UID}:${NB_GID} /home/jovyan/work
19+
USER ${NB_UID}
2020

2121
# ---------- extra Python deps -----------------------------------------------------
2222
# CPU-only PyTorch (wheels from CPU index)
@@ -29,6 +29,7 @@ RUN pip install --no-cache-dir \
2929
torch-geometric \
3030
-f https://data.pyg.org/whl/torch-2.7.0+cpu.html
3131

32+
# Then install your extra deps
3233
COPY ./requirements.txt /tmp/
3334
RUN pip install --no-cache-dir -r /tmp/requirements.txt
3435

docker/Dockerfile.gpu

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22
# GPU-enabled Jupyter + PyTorch + your course
33
# ────────────────────────────────────────────────────────────────────────────────
44
FROM quay.io/jupyter/pytorch-notebook:cuda12-python-3.11.9
5-
5+
# ---------- system utilities ------------------------------------------------------
66
USER root
77
RUN apt-get update && \
88
apt-get install -y --no-install-recommends git && \
99
rm -rf /var/lib/apt/lists/*
1010
USER ${NB_UID}
1111

12+
# ---------- copy the course -------------------------------------------------------
1213
WORKDIR /home/jovyan/work
1314
RUN git clone --depth 1 https://github.com/DeepTrackAI/DeepLearningCrashCourse.git .
1415

15-
# ensure jovyan owns the workspace
16+
# ---------- ensure correct ownership ---------------------------------------------
1617
USER root
1718
RUN chown -R ${NB_UID}:${NB_GID} /home/jovyan/work
1819
USER ${NB_UID}
1920

21+
# ---------- extra Python deps -----------------------------------------------------
2022
# Base image already has CUDA-enabled PyTorch 2.7+
2123
# Install PyG CUDA wheels matching torch 2.7.0+cu121
2224
RUN pip install --no-cache-dir \
@@ -36,6 +38,5 @@ RUN pip install --no-cache-dir \
3638
RUN jupyter nbextension install --py widgetsnbextension --sys-prefix && \
3739
jupyter nbextension enable --py widgetsnbextension --sys-prefix
3840

39-
4041
EXPOSE 8888
4142
CMD ["start-notebook.sh"]

0 commit comments

Comments
 (0)