Blackhards / Dockerfile
ositamiles's picture
Update Dockerfile
839b0cb verified
raw
history blame contribute delete
631 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies from requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose the port the app runs on
EXPOSE 7860
# Command to run the app using Uvicorn server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]