File size: 431 Bytes
640eb2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Taxy ML API — Docker image untuk Hugging Face Spaces (CPU)
FROM python:3.11-slim

WORKDIR /app

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

# Kode + model
COPY . .

# Cache ke /tmp (HF Spaces: home read-only) + port HF
ENV PORT=7860 \
    KERAS_HOME=/tmp/.keras \
    HF_HOME=/tmp/.hf \
    TF_CPP_MIN_LOG_LEVEL=3 \
    PYTHONUNBUFFERED=1

EXPOSE 7860

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