Spaces:
Paused
Paused
File size: 735 Bytes
5199dd3 3d30bed 150e5be 5199dd3 150e5be 5199dd3 150e5be 5199dd3 150e5be 5199dd3 3d30bed 150e5be 5199dd3 150e5be 5199dd3 150e5be 5199dd3 |
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 30 31 32 33 34 |
# Dockerfile
FROM python:3.9-slim
WORKDIR /app
# نصب dependencies سیستمی
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# کپی فایل requirements
COPY requirements.txt .
# نصب پکیج های پایتون
RUN pip install --no-cache-dir -r requirements.txt
# کپی فایل اصلی
COPY persian_legal_scraper.py .
# ایجاد دایرکتوری های کش
RUN mkdir -p /tmp/hf_cache /tmp/torch_cache
# تنظیم محیط
ENV TRANSFORMERS_CACHE=/tmp/hf_cache
ENV HF_HOME=/tmp/hf_cache
ENV TORCH_HOME=/tmp/torch_cache
ENV TOKENIZERS_PARALLELISM=false
# پورت اکسپوز
EXPOSE 7860
# اجرای برنامه
CMD ["python", "persian_legal_scraper.py"] |