Spaces:
Build error
Build error
| FROM python:3.10-slim | |
| # Thiết lập cache cho Transformers (nếu dùng) | |
| ENV TRANSFORMERS_CACHE=/tmp/cache | |
| # Thiết lập cache cho NLTK | |
| ENV NLTK_DATA=/tmp/nltk_data | |
| # Tạo thư mục cache và nltk_data với quyền ghi | |
| RUN mkdir -p /tmp/cache /tmp/nltk_data && chmod -R 777 /tmp | |
| RUN python -m spacy download en_core_web_sm | |
| # Tạo thư mục làm việc | |
| WORKDIR /code | |
| # Copy source code | |
| COPY . . | |
| # Cài requirements | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose port (tuỳ ứng dụng) | |
| EXPOSE 7860 | |
| # Chạy ứng dụng | |
| CMD ["python", "app.py"] | |