File size: 432 Bytes
153e456
22b998b
 
 
941e116
 
 
030fe00
941e116
6707a85
 
 
 
7a240a4
6707a85
7a240a4
6707a85
7a240a4
941e116
7a240a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.13

WORKDIR /app

COPY . .

RUN pip install --no-cache-dir -r requirements.txt
#RUN pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu130

# Create non-root user
RUN useradd -m -u 1000 appuser

# Hugging Face cache
ENV HF_HOME=/app/.cache
RUN mkdir -p /app/.cache && chown -R appuser:appuser /app

USER appuser

EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]