| 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 |
|
|
| |
| 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"] |