Spaces:
Sleeping
Sleeping
File size: 683 Bytes
649544e b61b3ec 649544e b61b3ec 649544e b61b3ec 89b4549 b61b3ec 649544e 40f00f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
HF_HOME=/app/.cache
WORKDIR /app
# Install dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download models (build sırasında)
RUN python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('all-MiniLM-L6-v2'); print('Model loaded successfully')"
RUN python -c "from transformers import pipeline; model = pipeline('sentiment-analysis', model='distilbert-base-uncased-finetuned-sst-2-english', device=-1); print('Sentiment model loaded successfully')"
# Copy app files
COPY *.py ./
EXPOSE 7860
CMD ["python", "app.py"]
|