File size: 781 Bytes
f2cbc81
31d4342
f2cbc81
bba5e4f
 
 
 
 
 
6edd395
fe55dbd
 
 
 
2a81777
bba5e4f
 
 
 
 
 
 
 
31d4342
1250f16
 
 
 
f2cbc81
 
 
 
 
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
28
29
30
31
32
33
34

FROM python:3.9-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    git \
    gcc \
    g++ \
    && rm -rf /var/lib/apt/lists/*

# Create cache directory with correct permissions
RUN mkdir -p /cache/models /cache/datasets && \
    chmod -R 777 /cache  # Full permissions for all users

# Install Python packages
RUN pip install --no-cache-dir \
    torch==2.1.2+cpu -f https://download.pytorch.org/whl/torch_stable.html \
    transformers==4.36.0 \
    sentencepiece==0.2.0 \
    accelerate==0.25.0 \
    huggingface-hub==0.19.4 \
    gradio==3.50.2 \
    datasets==2.15.0 \
    safetensors==0.4.1

# Configure cache
ENV TRANSFORMERS_CACHE="/cache/models"
ENV HF_DATASETS_CACHE="/cache/datasets"

WORKDIR /app
COPY . /app

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