Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +13 -10
Dockerfile
CHANGED
|
@@ -1,20 +1,23 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Set the working directory in the container
|
| 7 |
WORKDIR /code
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
-
cuda-drivers \
|
| 12 |
-
&& apt-get clean \
|
| 13 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
-
|
| 15 |
-
# Copy requirements and install Python dependencies
|
| 16 |
COPY ./requirements.txt /code/requirements.txt
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Copy the rest of the application code
|
| 20 |
COPY . .
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
FROM nvidia/cuda:11.4.1-cudnn8-devel-ubuntu20.04
|
| 4 |
+
|
| 5 |
+
# Install Python
|
| 6 |
+
RUN apt-get update && \
|
| 7 |
+
apt-get install -y python3.9 python3-pip
|
| 8 |
+
|
| 9 |
+
# Install NumPy and GRPCIO
|
| 10 |
+
RUN pip3 install --no-cache-dir --upgrade numpy grpcio
|
| 11 |
|
| 12 |
# Set the working directory in the container
|
| 13 |
WORKDIR /code
|
| 14 |
|
| 15 |
+
# Copy the requirements file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
COPY ./requirements.txt /code/requirements.txt
|
| 17 |
+
|
| 18 |
+
# Install dependencies
|
| 19 |
+
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 20 |
+
|
| 21 |
|
| 22 |
# Copy the rest of the application code
|
| 23 |
COPY . .
|