api / Dockerfile
tracinginsights's picture
Update Dockerfile
2d97fc2
raw
history blame
No virus
628 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 apt-get update && apt-get install -y python3-venv
RUN python3 -m venv /venv
ENV PATH="/venv/bin:$PATH"
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"]