Spaces:
Sleeping
Sleeping
File size: 590 Bytes
835d26c |
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 |
# Gunakan Python image
FROM python:3.10-slim
# Set environment variables untuk cache Hugging Face agar tidak nulis ke /.cache
ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers
ENV HF_HOME=/tmp/huggingface
# Set working directory
WORKDIR /app
# Salin semua file ke container
COPY . .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Buat folder cache yang bisa ditulis
RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface
# Expose port yang digunakan Flask
EXPOSE 7860
# Jalankan aplikasi Flask
CMD ["python", "app.py"]
|