File size: 433 Bytes
0e261b3
f0a8cf7
5b57a58
 
 
 
0d17181
5b57a58
0d17181
5b57a58
 
81c4c09
be03b42
5b57a58
 
 
 
 
0d17181
28609da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.10-slim

# Set up a non-root user as recommended by Hugging Face
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

# Copy requirement files and install
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy everything else with correct ownership
COPY --chown=user . .

# Explicitly expose port 7860
EXPOSE 7860

CMD ["python", "app.py"]