api / Dockerfile
tracinginsights's picture
Update Dockerfile
69c4c4c
raw
history blame
601 Bytes
# FROM python:3.10.9
# WORKDIR /code
# RUN mkdir /code/cache
# COPY ./requirements.txt /code/requirements.txt
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# COPY . .
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
FROM python:3.10.9
WORKDIR /code
RUN mkdir /code/cache && chmod a+w /code/cache && chmod a+rwx /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
ENV FASTF1_CACHE_DIR="/code/cache"
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]