- need nvidia gpu to run
- make sure to have up to date nvidia drivers
- create Dockerfile
FROM nvidia/cuda:12.8.0-base-ubuntu22.04
# Install development tools and libraries
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
python3 \
python3-pip \
wget \
gcc \
g++ \
curl \
gdb \
neovim \
&& rm -rf /var/lib/apt/lists/*
# Set up working directory
WORKDIR /workspace
RUN pip3 install numpy torch torchvision
# Set a default command
CMD ["/bin/bash"]- build image and run container (create aliases if you want) Example:
# bashrc
alias buildlinuxdock='docker buildx build -t cuda-dev .'
alias runlinuxdock='docker run --gpus all -it --rm -v $(pwd):/workspace cuda-dev'buildlinuxdock && runlinuxdock- access container from vscode (optional)
- Install Remote Development extension
- Bottom left click on the remote window icon "><" and select 'attach to running container'
- select the container you just ran via docker run
- access the '/workspace' directory that was built
- build company with 5T marketcap