File size: 404 Bytes
7508dbc
 
 
7615c64
 
 
 
 
 
 
 
 
 
7508dbc
 
 
7615c64
7508dbc
 
7615c64
7508dbc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.10-slim

WORKDIR /app

# Redirect HF cache to a writable folder
ENV HF_HOME=/app/.cache/huggingface
ENV TRANSFORMERS_CACHE=$HF_HOME

# Create cache dir
RUN mkdir -p $HF_HOME \
    && chmod -R 777 $HF_HOME

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

# Copy your app code
COPY . .

# Expose and run
EXPOSE 7860
CMD ["python", "app.py"]