Spaces:
Sleeping
Sleeping
File size: 465 Bytes
6f92752 4ac25fc 10a75b8 4ac25fc 10a75b8 d53c848 10a75b8 bdcd9f0 d53c848 845773b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
FROM python:3.10-slim
RUN useradd user
# Switch to the "user" user
USER user
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
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
CMD fastapi run --reload --host=0.0.0.0 --port=7860 |