File size: 543 Bytes
ea38274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# HuggingFace Spaces Dockerfile for Stack 2.9
# Use this for free inference hosting on HF Spaces
# https://huggingface.co/docs/hub/spaces-sdks-docker

FROM python:3.11-slim

# Set environment
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
ENV HF_HUB_ENABLE_HF_TRANSFER=1

# Install dependencies - includes Gradio, Transformers, PyTorch
RUN pip install --no-cache-dir \
    gradio>=4.0.0 \
    transformers>=4.40.0 \
    torch \
    accelerate \
    huggingface_hub

# Copy app
COPY app.py .

# Expose port
EXPOSE 7860

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