Skip to content

Commit 892bcea

Browse files
committed
Add docker image for sirius dependencies
1 parent 3bef09b commit 892bcea

2 files changed

Lines changed: 43 additions & 25 deletions

File tree

docker/Dockerfile

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu22.04
1+
FROM nvidia/cuda:12.6.1-devel-ubuntu22.04
2+
ENV DEBIAN_FRONTEND=noninteractive
3+
WORKDIR /root
24

3-
ENV TZ=Asia/Dubai
4-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5+
# Common dependencies
6+
RUN apt-get update && apt-get install -y git g++ cmake ninja-build libssl-dev wget vim unzip
57

6-
RUN apt update -y
7-
RUN apt-get update -y
8-
RUN apt install -y g++ make wget unzip vim htop git dstat
9-
RUN apt install -y software-properties-common
10-
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
11-
RUN apt update
12-
RUN apt-get install -y build-essential
13-
RUN apt-get install -y libc-dev
14-
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
15-
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
8+
# CMake 3.30.4
9+
RUN wget https://github.com/Kitware/CMake/releases/download/v3.30.4/cmake-3.30.4-linux-x86_64.sh && \
10+
chmod +x cmake-3.30.4-linux-x86_64.sh && \
11+
./cmake-3.30.4-linux-x86_64.sh --skip-license --prefix=/usr/local && \
12+
rm cmake-3.30.4-linux-x86_64.sh
1613

17-
# install cmake
18-
RUN wget https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0-linux-x86_64.sh
19-
RUN mkdir /opt/cmake
20-
RUN sh cmake-3.28.0-linux-x86_64.sh --skip-license --prefix=/opt/cmake/
21-
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
22-
RUN apt install -y ninja-build
14+
# Install Miniconda
15+
ENV CONDA_DIR=/opt/conda
16+
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
17+
bash Miniconda3-latest-Linux-x86_64.sh -b -p $CONDA_DIR && \
18+
rm Miniconda3-latest-Linux-x86_64.sh
19+
ENV PATH=$CONDA_DIR/bin:$PATH
2320

24-
# Install nsight compute
25-
RUN apt-get install -y nsight-compute-2024.1.1
21+
# Create conda env with libcudf
22+
RUN conda update -n base -c defaults conda && \
23+
conda create -n libcudf-env -y && \
24+
conda run -n libcudf-env conda install -y -c rapidsai -c conda-forge -c nvidia rapidsai::libcudf
25+
ENV USE_CUDF=1
26+
ENV LIBCUDF_ENV_PREFIX=$CONDA_DIR/envs/libcudf-env
2627

27-
RUN mkdir -p /working_dir
28-
WORKDIR /working_dir
29-
RUN git config --global --add safe.directory "*"
28+
# Activates libcudf env at runtime beginning
29+
RUN echo 'echo "[INFO] Initializing conda environment... please wait (conda activation can take a few seconds)"' >> ~/.bashrc && \
30+
echo "source /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
31+
echo "conda activate libcudf-env" >> ~/.bashrc && \
32+
echo 'echo "[INFO] Finished initializing conda environment"' >> ~/.bashrc

docs/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,22 @@ For users who have access to AWS and want to launch AWS EC2 instances to run Sir
2626

2727
Supported EC2 instances: G6.
2828

29-
## Dependencies (Option 2): Install Manually
29+
## Dependencies (Option 2): Use Docker Image
30+
To use the docker image with dependencies fully installed:
31+
```
32+
sudo docker run --gpus all -it yifeiyang7/sirius_dependencies:latest bash
33+
```
34+
35+
Make sure both `nvidia-driver` and `nvidia-container-toolkit` are installed, `nvidia-driver` can be installed by
36+
```
37+
sudo apt install nvidia-driver-535
38+
```
39+
and `nvidia-container-toolkit` can be installed following the [instructions](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). Then restart docker by
40+
```
41+
sudo systemctl restart docker
42+
```
43+
44+
## Dependencies (Option 3): Install Manually
3045

3146
### Install duckdb dependencies
3247
```

0 commit comments

Comments
 (0)