Spaces:
Runtime error
Runtime error
File size: 731 Bytes
c033def 73cfd62 c033def 73cfd62 c033def 73cfd62 c033def 7c38b83 c033def 7c38b83 c033def 73cfd62 c033def 73cfd62 c033def |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# BASE IMAGE
FROM python:3.12.3-slim
# SET WORKING DIRECTORY
WORKDIR /app
# COPY REQUIREMENTS FILE
COPY requirements.txt .
# INSTALL SYSTEM DEPENDENCIES AND UPGRADE PIP
RUN apt-get update \
&& apt-get install -y git build-essential libffi-dev libssl-dev python3-dev \
&& pip install --upgrade pip \
&& pip install -r requirements.txt \
&& apt-get clean
# COPY ALL CONTENTS OF THE CURRENT DIRECTORY
COPY . .
# RUN THE PYTHON SCRIPT TO DOWNLOAD NECESSARY MODELS AND FILES
RUN python download_models.py
# USE 4 WORKER PROCESSES AND ENABLE LOGGING TO STDOUT
CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "fast_api:app", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"]
|