diffusion-chatbot / Dockerfile
Andhs's picture
Upload 2 files
4b7a527 verified
Raw
History Blame Contribute Delete
972 Bytes
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel
USER root
WORKDIR /app
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# 1. Clone into an isolated directory
RUN git clone --recurse-submodules https://github.com/ZHZisZZ/dllm.git /tmp/dllm-build
# 2. Build and install globally into site-packages (NO editable mode flags)
RUN pip install --no-cache-dir /tmp/dllm-build && \
pip install --no-cache-dir /tmp/dllm-build/lm-evaluation-harness && \
rm -rf /tmp/dllm-build
# 3. Clean up additional pip requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
# 4. HF Spaces Permission Compliance
RUN useradd -m -u 1000 user && \
chown -R user:user /app
USER user
ENV HOME=/home/user
ENV PATH=/home/user/.local/bin:$PATH
ENV HF_HOME=/home/user/.cache/huggingface
ENV MODEL_NAME=dllm-hub/Qwen3-0.6B-diffusion-bd3lm-v0.1
ENV PORT=7860
EXPOSE 7860
CMD ["python", "app.py"]