erase-research / Dockerfile
soundunity's picture
Revert bucket persistence; back to ephemeral cache
a7fbd15 verified
Raw History Blame Contribute Delete
752 Bytes
# Mirrors the locally-verified env: torch 2.2.2 + CUDA 12.1, Python 3.10.
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 libglib2.0-0 git && rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
ERASE_DEVICE=cuda:0 \
HF_HOME=/home/user/.cache/huggingface \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_SERVER_PORT=7860 \
PYTHONUNBUFFERED=1
WORKDIR /home/user/app
COPY --chown=user:user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir --no-deps torchattacks==3.5.1
COPY --chown=user:user . .
EXPOSE 7860
CMD ["python", "app.py"]