shank commited on
Commit ·
db12eaa
1
Parent(s): dc7eb3f
Fix: Fixed dependancy issues
Browse files- Dockerfile +3 -2
- requirements.txt +4 -3
Dockerfile
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
# Install curl for healthcheck
|
| 6 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
-
#
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
|
|
|
| 1 |
+
FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
# Install curl for healthcheck
|
| 6 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
# torch + CUDA 12.1 + cuDNN 8 are already in the base image.
|
| 9 |
+
# requirements.txt installs only the remaining app-level deps.
|
| 10 |
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
-
# torch
|
| 2 |
-
#
|
| 3 |
-
torch
|
|
|
|
|
|
| 1 |
+
# torch, CUDA 12.1, and cuDNN 8 are pre-installed in the base image:
|
| 2 |
+
# pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
|
| 3 |
+
# Do NOT add torch here — pip would resolve to the CPU wheel from default PyPI
|
| 4 |
+
# and overwrite the CUDA-enabled torch from the base image.
|