agentes-unit4 / Dockerfile
jbaselga's picture
Update Dockerfile
b25e942 verified
raw
history blame contribute delete
648 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y gcc libffi-dev libssl-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir --upgrade "smolagents>=0.1.18"
# 👇 Evita errores de permisos con cachés
ENV HF_HOME=/data/.cache
ENV TRANSFORMERS_CACHE=/data/.cache
ENV HF_DATASETS_CACHE=/data/.cache
ENV HUGGINGFACE_HUB_CACHE=/data/.cache
RUN mkdir -p /data/.cache && chmod -R 777 /data/.cache
COPY . .
CMD ["uvicorn", "api_server:app", "--host", "0.0.0.0", "--port", "7860"]