File size: 520 Bytes
daafaef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.9

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the model file and the app code
COPY ./sac_v9_pytorch_best_eval.pt /code/sac_v9_pytorch_best_eval.pt
COPY ./app.py /code/app.py

# Create a writable cache directory for Hugging Face
RUN mkdir -p /code/cache
RUN chmod -R 777 /code/cache
ENV XDG_CACHE_HOME=/code/cache

# Start the server on port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]