codecrafter / Dockerfile
GuhanAein's picture
Update Dockerfile
b07fba8 verified
Raw
History Blame Contribute Delete
493 Bytes
FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Create a writable cache directory
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
# Set environment variable for Hugging Face cache (updated to HF_HOME)
ENV HF_HOME=/app/.cache
EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]