Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -7
Dockerfile
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
# Install Python
|
6 |
RUN apt-get update && \
|
7 |
apt-get install -y python3.9 python3-pip
|
8 |
|
@@ -18,9 +17,8 @@ COPY ./requirements.txt /code/requirements.txt
|
|
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 . .
|
24 |
|
25 |
-
#
|
26 |
CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
# Use an official CUDA image as the base image
|
2 |
+
FROM nvidia/cuda:11.4.1-cudnn8-runtime-ubuntu20.04
|
3 |
|
4 |
+
# Install Python and pip
|
|
|
|
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y python3.9 python3-pip
|
7 |
|
|
|
17 |
# Install dependencies
|
18 |
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
19 |
|
20 |
+
# Copy the application files to the container
|
|
|
21 |
COPY . .
|
22 |
|
23 |
+
# Specify the command to run on container start
|
24 |
CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]
|