DarkyCodez/MetaxScaler
0
1FROM python:3.10-slim
2
3# Create a non-root user for security (required by some HF configurations)
4RUN useradd -m -u 1000 user
5USER user
6ENV HOME=/home/user \
7 PATH=/home/user/.local/bin:$PATH
8
9WORKDIR $HOME/app
10
11# Copy requirements first to leverage Docker cache
12COPY --chown=user requirements.txt .
13RUN pip install --no-cache-dir -r requirements.txt
14
15# Copy the rest of the files (including the new server/ folder)
16COPY --chown=user . .
17
18# Expose the port Hugging Face expects
19EXPOSE 7860
20
21# IMPORTANT: Point uvicorn to the new 'server' folder and 'app' file
22CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]