cudair simplifies the development of CUDA applications by allowing live-reloading, similar to golang-air. With built-in Docker support and easy configuration, you can quickly set up your project environment and focus on writing code without the hassle of manual restarts. Ideal for developers aiming to boost productivity.
cudair is an innovative tool designed to enable live-reloading for CUDA applications, streamlining your development process much like golang-air. Its straightforward configuration and Docker support make it an ideal choice for developers working with CUDA.
For optimal performance, cudair recommends using Go version v1.23 or higher.
To begin using cudair, navigate to your project directory and initiate cudair:
cd /path/to/your_projects
cudair run -c .cudair.toml
You can also initialize a project with a configuration file:
cudair init
Your configuration file must be in .toml format. Here’s a sample configuration:
# Root directory to watch
root = "."
# Temporary directory name
tmp_dir = "tmp"
[build]
# Executable command
bin = "./tmp/main"
# Compilation command
cmd = "nvcc --std=c++17 -o ./tmp/main main.cu"
# Log file for build errors
log = "build-errors.log"
# Directories to exclude from monitoring
exclude_dir = ["tmp"]
For developers utilizing Docker, cudair components are easily configured within Docker installations. Here’s a quick overview:
FROM nvcr.io/nvidia/cuda:12.6.2-cudnn-devel-ubuntu20.04
RUN apt-get update && apt-get install -y wget
# Install Golang
RUN rm -rf /usr/local/go && wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin
RUN go install github.com/ei-sugimoto/cudair@latest
WORKDIR /app
COPY . .
CMD ["cudair", "run", "-c", ".cudair.toml"]
To build your Docker image, execute:
docker build -t cudair-sample
Then, create the container with:
docker run --rm -it --gpus all -v path/to/your_project:/app cudair-sample
With cudair, you can significantly improve your CUDA application development experience, enhancing productivity and simplifying the workflow.
precious !
Very nicely done.
Sign in to comment.