dep1 / Dockerfile
andanje's picture
Upload 3 files
d1b3ee0 verified
raw
history blame contribute delete
474 Bytes
## Use official py3.9
FROM python:3.9
## Set the workdir
WORKDIR /code
## CPY
COPY ./requirements.txt /code/requirements.txt
## Install
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
## Set up a new user
USER user
# Set env
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Setr Wrkdir
WORKDIR $HOME/app
# copy
COPY --chown=user . $HOME/app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]