File size: 531 Bytes
2fbf461
 
12b3d87
2fbf461
 
12b3d87
2fbf461
 
 
12b3d87
fd1bd47
492d13b
e8b18ac
 
12b3d87
2fbf461
 
12b3d87
050e095
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.9

# Set working directory
WORKDIR /code

# Copy requirements file and install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Set environment variable for Transformers cache
ENV HF_HOME=/tmp/transformers_cache


COPY ./caption_server.py /code/caption_server.py
# Copy the rest of the application code
COPY . .

# Command to run your application
CMD ["uvicorn", "caption_server:app", "--reload", "--host", "0.0.0.0", "--port", "7860"]