Spaces:
Sleeping
Sleeping
File size: 781 Bytes
3ec9401 bc7538f 3ec9401 f318847 3ec9401 6a28855 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
FROM python:3.9
# The two following lines are requirements for the Dev Mode to be functional
# Learn more about the Dev Mode at https://huggingface.co/dev-mode-explorers
RUN useradd -m -u 1000 user
WORKDIR /app
COPY --chown=user ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
# COPY --chown=user . /app
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \\
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |