ZillionParts-PDF2Doc / Dockerfile
E-slam's picture
Update Dockerfile
bf5abba verified
raw
history blame
616 Bytes
FROM python:3.9
# Create a new user and group and set them as the default user
RUN groupadd -r appuser && useradd -r -g appuser appuser
# Set the working directory
WORKDIR /code
# Copy the requirements file and install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Change ownership of the working directory
RUN chown -R appuser:appuser /code
# Switch to the new user
USER appuser
# Copy the rest of the application code
COPY . .
# Set the default command
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]