Spaces:
Sleeping
Sleeping
File size: 772 Bytes
586855e 0ddf35f 586855e 0ddf35f 586855e 0ddf35f 586855e 0ddf35f 586855e 5ec3070 ec87896 586855e 5ec3070 586855e 0ddf35f 586855e 0ddf35f 586855e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# Use the official Python image as base
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container at /app
COPY requirements.txt ./requirements.txt
# Install system dependencies
RUN apt-get update \
&& apt-get -y install libpq-dev gcc \
&& rm -rf /var/lib/apt/lists/*
# Install psycopg2
RUN pip install psycopg2
# Install uvicorn
RUN pip install uvicorn
# Install Python dependencies
RUN pip install -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Set the entry point for running the application with Uvicorn
ENTRYPOINT ["uvicorn", "main:app"]
# Specify default command arguments for Uvicorn
CMD ["--host", "0.0.0.0", "--port", "7860"]
|