Spaces:
Runtime error
Runtime error
File size: 649 Bytes
ca017d0 | 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 | FROM python:3.9
# Create a new group and user
RUN groupadd -g 1000 StefanG2002 && \
useradd -m -u 1000 -g StefanG2002 StefanG2002
# Set ownership and permissions for the home directory
RUN chown -R StefanG2002:StefanG2002 /home/StefanG2002 && \
chmod -R 755 /home/StefanG2002
# Switch to the newly created user
USER StefanG2002
# Set environment variables
ENV HOME=/home/StefanG2002 \
PATH=/home/StefanG2002/.local/bin:$PATH
WORKDIR /code
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"] |