# Use the official Python image from Docker Hub FROM python:3.9-slim # Set the working directory WORKDIR /app # Install required packages, including Git RUN apt-get update && apt-get install -y --no-install-recommends \ git \ wget \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Set up Hugging Face cache directory RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache/huggingface # Set environment variables ENV HF_HOME=/app/.cache/huggingface ENV TRANSFORMERS_CACHE=/app/.cache/huggingface # Configure Git RUN git config --system user.email "dubswayindia@gmail.com" && \ git config --system user.name "peace2024" # Copy requirements COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the application code COPY app.py . # Expose the application's port EXPOSE 8000 # Start the application CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]