mcp-cpu-madness / Dockerfile
Cordobian's picture
Update Dockerfile
40f00f2 verified
raw
history blame contribute delete
683 Bytes
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"]