smart-chatbot / Dockerfile
Adityabhatia0204's picture
Update Dockerfile
6910f49 verified
raw
history blame contribute delete
600 Bytes
FROM python:3.10-slim
# Create working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Copy project files
COPY . /app
# Create huggingface cache directory
RUN mkdir -p /app/hf_home/transformers
# Set environment variables for cache
ENV TRANSFORMERS_CACHE=/app/hf_home/transformers
ENV HF_HOME=/app/hf_home
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose port (important for Hugging Face Docker SDK)
EXPOSE 7860
# Run Flask app
CMD ["python", "app.py"]