LPXian/Graph-News.AI
0
1# Use Python 3.11
2FROM python:3.11-slim
3
4# Set working directory
5WORKDIR /code
6
7# Copy requirements and install
8COPY ./requirements.txt /code/requirements.txt
9RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
11# Copy the rest of the app
12COPY . /code
13
14# Standard Hugging Face Spaces port is 7860
15ENV PORT=7860
16
17# Create a non-root user (required by Hugging Face)
18RUN useradd -m -u 1000 user
19USER user
20ENV HOME=/home/user \
21 PATH=/home/user/.local/bin:$PATH
22
23# Run uvicorn
24CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
25 