TangSan003's picture
update Dockerfile
9f54860 verified
raw
history blame contribute delete
534 Bytes
FROM python:3.9-slim-buster
WORKDIR /app
# Đặt biến môi trường HF_HOME
ENV HF_HOME="/app/hf_cache"
# Tạo thư mục cache và đảm bảo quyền ghi cho nó và tất cả các thư mục con.
# -R là quan trọng để áp dụng quyền đệ quy (cho tất cả các thư mục con).
RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]