-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile-gpu
More file actions
33 lines (27 loc) · 887 Bytes
/
Dockerfile-gpu
File metadata and controls
33 lines (27 loc) · 887 Bytes
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
# GPU Dockerfile for MASE
#
# Uses a plain Ubuntu base image. CUDA support is provided by the PyTorch
# wheel which bundles the necessary CUDA runtime libraries.
#
# Requirements:
# - NVIDIA GPU with drivers installed on the host
# - Run with: docker run --gpus all ...
#
# Example build command:
# docker buildx build --platform linux/amd64 \
# -f Dockerfile-gpu \
# --tag aaronyirenzhao/mase-gpu:latest \
# --push .
FROM ubuntu:22.04
USER root
# Install system packages
ADD install-pkgs.sh install-pkgs.sh
RUN bash install-pkgs.sh
RUN pip3 install --upgrade pip
# Install PyTorch with CUDA support.
# pip installs the CUDA-enabled wheel by default on Linux (includes bundled CUDA runtime).
RUN pip3 install --no-cache-dir torch torchvision torchaudio
# Install MASE and its dependencies
ADD install-pips.sh install-pips.sh
RUN bash install-pips.sh
CMD ["bash"]