api / Dockerfile
tracinginsights's picture
Update Dockerfile
575d525
raw
history blame
641 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
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
ENV FASTF1_CACHE_DIR="/home/user/fastf1-cache"
COPY . .
CMD ["sh", "-c", "mkdir -p $FASTF1_CACHE_DIR && chown -R $USER:$USER $FASTF1_CACHE_DIR && exec uvicorn main:app --host 0.0.0.0 --port 7860"]