FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ GRADIO_ANALYTICS_ENABLED=False \ NVIDIA_VISIBLE_DEVICES=all \ NVIDIA_DRIVER_CAPABILITIES=compute,utility WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-dev \ python3-pip \ python-is-python3 \ ffmpeg \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ build-essential \ && rm -rf /var/lib/apt/lists/* COPY requirements-gpu.txt . RUN python -m pip install --upgrade pip \ && python -m pip install -r requirements-gpu.txt RUN ln -sf /usr/local/cuda/targets/x86_64-linux/lib/libnvrtc.so.11.8.89 \ /usr/local/cuda/targets/x86_64-linux/lib/libnvrtc.so \ && ldconfig COPY . . RUN printf '%s\n' \ 'server_name: "0.0.0.0"' \ 'server_port: 7860' \ 'server_share: false' \ 'provider: cuda' \ 'force_cpu: false' \ 'max_threads: 1' \ 'memory_limit: 0' \ 'selected_theme: Default' \ 'output_image_format: png' \ 'output_video_format: mp4' \ 'output_video_codec: libx264' \ 'video_quality: 14' \ 'clear_output: false' \ 'live_cam_start_active: false' \ 'output_template: "{file}_{time}"' \ 'use_os_temp_folder: false' \ > config.yaml EXPOSE 7860 CMD ["python", "run.py"]