Rightlight / Dockerfile
mike23415's picture
Update Dockerfile
accafc3 verified
raw
history blame
532 Bytes
FROM python:3.9-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
git \
libpng-dev \
libjpeg-dev \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/hf_home /tmp/cache /tmp/diffusers_cache && \
chmod -R 777 /tmp
COPY requirements.txt .
RUN python -m pip install --upgrade pip && \
python -m pip install --no-cache-dir -r requirements.txt -v
COPY app.py .
ENV HF_HOME=/tmp/hf_home
ENV XDG_CACHE_HOME=/tmp/cache
EXPOSE 7860
CMD ["python", "app.py"]