Skip to content

samif0/gpuprog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

setup

prereq

  1. need nvidia gpu to run
  2. make sure to have up to date nvidia drivers

docker setup

  1. 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"]
  1. 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
  1. 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

About

learning cuda and performance computing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages