File size: 380 Bytes
d46074d
be2d946
4a92b92
be2d946
 
4a92b92
 
 
 
 
 
be2d946
d46074d
be2d946
 
d46074d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.9

# Create writable cache with proper permissions
RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache

# Set environment variables at OS level
ENV TRANSFORMERS_CACHE=/tmp/cache
ENV HF_HOME=/tmp/cache
ENV HF_DATASETS_CACHE=/tmp/cache
ENV HUGGINGFACE_HUB_CACHE=/tmp/cache

WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt

CMD ["python", "api.py"]