Rockk08 commited on
Commit
8ef434b
·
1 Parent(s): ce35797

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -2
Dockerfile CHANGED
@@ -1,11 +1,23 @@
1
  FROM python:3.9
2
 
 
 
 
 
3
  WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
 
 
 
 
6
 
 
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
9
  COPY . .
10
 
11
- CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.9
2
 
3
+ # Use an official TensorFlow GPU base image
4
+ FROM tensorflow/tensorflow:latest-gpu
5
+
6
+ # Set the working directory in the container
7
  WORKDIR /code
8
 
9
+ # Install CUDA drivers (modify the version according to your requirements)
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
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
18
 
19
+ # Copy the rest of the application code
20
  COPY . .
21
 
22
+ # Set the default command to run your application
23
+ CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]