dordore / Dockerfile
Vgjkmhf's picture
Update Dockerfile
e201e47 verified
raw
history blame contribute delete
675 Bytes
FROM python:3.9-slim
RUN apt-get update && apt-get install -y \
git ninja-build build-essential libgl1-mesa-glx libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# نصب نسخه سبک CPU (حیاتی برای جلوگیری از پر شدن حافظه)
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN git clone https://github.com/Zeqiang-Lai/DragGAN.git
RUN cd DragGAN && pip install -e .
COPY app.py .
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
CMD ["python", "app.py"]