File size: 516 Bytes
7fed842 4e06dba 7fed842 4e06dba 7fed842 8ffa257 7fed842 8ffa257 7fed842 8ffa257 4e06dba 8ffa257 4e06dba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
FROM python:3.9
# Add a non-root user
RUN useradd -m -u 1000 user
# Set the working directory
WORKDIR /app
# Copy the requirements file and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the application code and the questions.db file
COPY --chown=user . /app
# Expose the port
EXPOSE 7860
# Set the command to run the application
CMD ["uvicorn", "app:app", "--no-access-log", "--host", "0.0.0.0", "--port", "7860"] |