CoolFace
Apppublic

ukmastercom/itinera-llm-agent

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
Dockerfile30 linesDownload Raw Back to root
1# Base image2FROM python:3.10-slim3 4WORKDIR /app5 6# Install system dependencies7RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*8 9# Set Hugging Face cache directory to writable /tmp/models10ENV HF_HOME=/tmp/models11ENV TRANSFORMERS_CACHE=/tmp/models12ENV HF_DATASETS_CACHE=/tmp/models13ENV HF_METRICS_CACHE=/tmp/models14 15# Copy requirements and install16COPY requirements.txt .17RUN pip install --no-cache-dir -r requirements.txt18 19# Pre-download the model during build20RUN python -c "from transformers import pipeline; pipeline('text-generation', model='distilgpt2', cache_dir='/tmp/models')"21 22# Copy application code23COPY app.py .24 25# Expose Gradio port26EXPOSE 786027 28# Launch Gradio (not FastAPI)29CMD ["python", "app.py"]30