File size: 972 Bytes
a919dff
 
a0b1374
a919dff
 
 
 
 
 
4b7a527
 
a919dff
4b7a527
 
 
 
a919dff
4b7a527
a0b1374
 
 
a919dff
 
4b7a527
a0b1374
 
 
4b7a527
a0b1374
 
 
 
a919dff
 
 
 
 
 
a0b1374
4b7a527
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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"]