File size: 673 Bytes
b3cef24
 
1f765e8
 
13533e9
1f765e8
b3cef24
 
13533e9
 
 
 
1f765e8
13533e9
 
 
 
 
1f765e8
 
d0907b2
b3cef24
1f765e8
b3cef24
13533e9
1f765e8
d0907b2
13533e9
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
FROM python:3.10-slim

RUN apt-get update && apt-get install -y \
    git ffmpeg curl build-essential \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Create writable cache directories
RUN mkdir -p /app/hf_cache/hub \
    && mkdir -p /app/hf_cache/xet \
    && mkdir -p /app/hf_cache/assets

# Set environment variables BEFORE installing libs
ENV HF_HOME=/app/hf_cache
ENV HF_HUB_CACHE=/app/hf_cache/hub
ENV HF_XET_CACHE=/app/hf_cache/xet
ENV HF_ASSETS_CACHE=/app/hf_cache/assets

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

COPY . .

# Expose port for web apps (Flask/Gradio/etc.)
EXPOSE 7860

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