Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# TODO: Update to Ubuntu 24.04
# Use the NVIDIA CUDA image as the base image
FROM nvidia/cuda:12.6.1-devel-ubuntu22.04

# Install C++ development tools and dependencies
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
build-essential \
gdb \
lldb \
clang \
llvm \
git \
curl \
wget \
htop \
tmux \
nano \
vim \
nvtop \
btop \
fzf \
rapidjson-dev \
libgmp3-dev \
libtclap-dev \
ca-certificates \
gpg \
sudo \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# TODO: Might not be necessary on Ubuntu 24.04
# Add Kitware APT repository and install the latest stable version of CMake
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \
&& echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update \
&& apt-get install -y --no-install-recommends kitware-archive-keyring \
&& apt-get install -y --no-install-recommends cmake \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Python development tools
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
python3-pip \
python3-venv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Fish shell and set it up with Oh My Fish and a nice theme
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
fish \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Ninja build tool
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
ninja-build \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Create vscode user
RUN useradd -ms /usr/bin/bash vscode

# Add the vscode user to the sudoers file with no password prompt
RUN echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Switch to the vscode user
USER vscode

# TODO: Fix Runtime path not available
# Set up fish
# RUN export NONINTERACTIVE=1 \
# && curl -L https://get.oh-my.fish | fish \
# && fish -c "omf install bobthefish" \
# && fish -c "omf install fzf"

# Install Python packages
RUN pip3 install --upgrade pip
38 changes: 38 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "GPU-EVM Dev Container",
"build": {
"dockerfile": "Dockerfile",
"context": "."
},
"runArgs": [
"--gpus",
"all"
],
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-azuretools.vscode-docker",
"mhutchie.git-graph",
"ms-vscode.cpptools-extension-pack",
"matepek.vscode-catch2-test-adapter",
"ms-vscode.cmake-tools",
"ms-vscode.hexeditor",
"nvidia.nsight-vscode-edition",
"rsip-vision.nvidia-smi-plus",
"ms-python.vscode-pylance",
"ms-python.python",
"rust-lang.rust-analyzer"
]
}
},
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/usr/local/cuda/bin",
"LD_LIBRARY_PATH": "${containerEnv:LD_LIBRARY_PATH}:/usr/local/cuda/lib64"
},
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"remoteUser": "vscode"
}
18 changes: 18 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Create and activate Python virtual environment
# python3 -m venv /workspaces/GPU-EVM/evm_venv
# source /workspaces/GPU-EVM/evm_venv/bin/activate

# Install Python dependencies
# pip install -r /workspaces/GPU-EVM/requirements.txt

# Apply any necessary patches
# patch -p1 < /workspaces/GPU-EVM/wip/computation.patch

# Set up CUDA environment variables
echo 'fish_add_path /usr/local/cuda/bin' >> ~/.config/fish/config.fish
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.config/fish/config.fish

# Source the updated config.fish
source ~/.config/fish/config.fish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,6 @@ build/*
#effective_cpp.*

tmp/
!.devcontainer/devcontainer.json
!docker/**
!src/networking/**
Loading