Update Dockerfile
Browse files- Dockerfile +11 -4
Dockerfile
CHANGED
|
@@ -1,12 +1,19 @@
|
|
| 1 |
-
FROM nvidia/cuda:
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y python3 python3-pip git && \
|
| 4 |
pip3 install --upgrade pip
|
| 5 |
|
| 6 |
-
|
| 7 |
WORKDIR /app
|
| 8 |
-
RUN pip3 install -r requirements.txt
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]
|
|
|
|
| 1 |
+
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
|
| 2 |
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
|
| 5 |
+
# Python + dependencies
|
| 6 |
RUN apt-get update && apt-get install -y python3 python3-pip git && \
|
| 7 |
pip3 install --upgrade pip
|
| 8 |
|
| 9 |
+
# Set working dir
|
| 10 |
WORKDIR /app
|
|
|
|
| 11 |
|
| 12 |
+
# Copy and install requirements
|
| 13 |
+
COPY requirements.txt ./
|
| 14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
+
|
| 16 |
+
# Copy app code
|
| 17 |
+
COPY . .
|
| 18 |
|
| 19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]
|