aiWeb / Dockerfile
benkada's picture
Update Dockerfile
7de75e8 verified
raw
history blame contribute delete
517 Bytes
FROM python:3.10
WORKDIR /code
# Copy the correct file
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Create and switch to a non-root user
RUN useradd -m user
USER user
# Environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
# Expose the port your app runs on
EXPOSE 7860
# Command to start the app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]