-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (35 loc) · 2.59 KB
/
Dockerfile
File metadata and controls
43 lines (35 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# ─────────────────────────────────────────────────────────────────────────────
# Dockerfile — VesselMNIST3D 3D Classification
#
# Base image: Official PyTorch + CUDA 11.8 runtime (NVIDIA GPU support).
# Falls back to CPU-only if no GPU is available when running the container.
#
# Build: docker build -t vessel-clf .
# Run: docker run --gpus all -v ${PWD}/data:/workspace/data \
# -v ${PWD}/outputs:/workspace/outputs \
# vessel-clf
# ─────────────────────────────────────────────────────────────────────────────
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
LABEL maintainer="vessel-clf"
LABEL description="3D ResNet-SE for VesselMNIST3D binary classification"
# ── System dependencies ────────────────────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# ── Working directory ─────────────────────────────────────────────────────────
WORKDIR /workspace
# ── Python dependencies (cached layer) ────────────────────────────────────────
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# ── Copy project source ────────────────────────────────────────────────────────
COPY . .
# ── Create runtime directories ─────────────────────────────────────────────────
RUN mkdir -p data \
outputs/checkpoints \
outputs/logs \
outputs/results
# ── Default command: run training ─────────────────────────────────────────────
CMD ["python", "-m", "src.train", "--config", "configs/config.yaml"]