match / Dockerfile
Chrunos's picture
Upload 3 files
6418d7a verified
raw
history blame contribute delete
598 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set up a new user 'user' with UID 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to /home/user/app
WORKDIR $HOME/app
# Copy the current directory contents into the container at /home/user/app
COPY --chown=user . .
# Install dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Expose port 7860
EXPOSE 7860
# Start the application using uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]