MedChatBot / Dockerfile
tmt3103's picture
change port
7db839c
raw
history blame contribute delete
498 Bytes
FROM python:3.9-slim
WORKDIR /app
# Copy requirements + setup.py
COPY requirements.txt setup.py ./
# dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Hugging Face cache
ENV HF_HOME=/app/.cache
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
# Pre-download model
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
COPY . .
# Expose port Hugging Face
EXPOSE 7860
CMD ["python", "app.py"]