| |
| FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04 |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| python3.9 \ |
| python3-pip \ |
| libgl1-mesa-glx \ |
| libglib2.0-0 \ |
| libsm6 \ |
| libxext6 \ |
| libxrender-dev \ |
| libgomp1 \ |
| wget \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN ln -s /usr/bin/python3.9 /usr/bin/python |
|
|
| |
| COPY requirements.txt . |
| COPY requirements-gpu.txt . |
|
|
| |
| RUN pip install --no-cache-dir -r requirements-gpu.txt |
|
|
| |
| RUN wget -O /app/inswapper_128.onnx https://github.com/deepinsight/insightface/releases/download/v0.7/inswapper_128.onnx || \ |
| echo "Please download inswapper_128.onnx manually" |
|
|
| |
| COPY app.py . |
|
|
| |
| EXPOSE 5000 |
|
|
| |
| CMD ["python", "app.py"] |