File size: 455 Bytes
c293f7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.9

WORKDIR /app

COPY requirements.txt .

# Install dependencies, adding psycopg2 for PostgreSQL support
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir psycopg2-binary==2.9.9

# Create necessary directories
RUN mkdir -p /app/data /app/logs

COPY . .

EXPOSE 7860

# We use host 0.0.0.0 and port 7860 specifically for Hugging Face Spaces
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]