emmet-generator / Dockerfile
victor-johnson's picture
Update Dockerfile
510de5b verified
raw
history blame contribute delete
523 Bytes
FROM python:3.10-slim
WORKDIR /app
# 1️⃣ Create a writable cache and point HF libs at it
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
ENV HF_HOME=/app/.cache
ENV XDG_CACHE_HOME=/app/.cache
# 2️⃣ Install git, Python deps
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 3️⃣ Copy your FastAPI code
COPY . .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]