api / Dockerfile
tracinginsights's picture
Update Dockerfile
a781d27
raw
history blame
602 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
USER root
WORKDIR /code
RUN mkdir /code/cache \
&& chown -R root:root /code/cache \
&& chmod -R 777 /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"]