File size: 541 Bytes
7603b27
 
896d5c7
7603b27
896d5c7
7603b27
 
 
 
 
 
896d5c7
 
7603b27
 
896d5c7
7603b27
 
 
 
 
896d5c7
7603b27
 
 
896d5c7
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
27
FROM python:3.11-slim

# Set environment variables
ENV HOME=/home/user
ENV PYTHONUNBUFFERED=1

# Create user home directory
RUN mkdir -p /home/user && chmod 777 /home/user

WORKDIR /app

# Copy requirements first for better caching
COPY requirements.txt .

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

# Copy application files
COPY app.py .
COPY Modelfile-AJ-Mini .

# Expose port for Hugging Face Spaces
EXPOSE 7860

# Start application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]