Spaces:
Sleeping
Sleeping
File size: 631 Bytes
0e0fcbe 9bf4af3 0e0fcbe 9bf4af3 0e0fcbe 9bf4af3 0e0fcbe 9bf4af3 0e0fcbe 839b0cb 9bf4af3 0e0fcbe 839b0cb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # 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"]
|