File size: 505 Bytes
727a40a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.13.5-slim

# Create non-root user (HF requirement)
RUN useradd -m -u 1000 user

# Set work directory
WORKDIR /home/user/app

# Copy requirements first (better cache)
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy project files
COPY . .

# Switch to non-root user
USER user

# Expose HF port
EXPOSE 7860

# Run Django with Gunicorn (PRODUCTION SAFE)
CMD ["daphne", "devnoms.asgi:application", "--bind", "0.0.0.0","--port" , "7860"]