Skip to content

Instantly share code, notes, and snippets.

@luisgizirian
Last active August 18, 2023 22:43
Show Gist options
  • Save luisgizirian/c9069e63064b3b5cdaf8753058e90b56 to your computer and use it in GitHub Desktop.
Save luisgizirian/c9069e63064b3b5cdaf8753058e90b56 to your computer and use it in GitHub Desktop.
Nvidia Jetson Orin Nano CUDA enabled Devcontainer along Go(lang) development
Check https://github.com/luisgizirian/cuda-image-builders
// For format details, see https://aka.ms/devcontainer.json.
// This implementation serves as basis. You can customize as needed.
{
"name": "Jetson Orin Nano CUDA with Go",
"dockerFile": "Dockerfile",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/go:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"golang.go"
]
}
},
"remoteEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
"runArgs": [
"--net=host",
"--runtime",
"nvidia"
]
}
# This implementation serves as basis. You can customize as needed.
# Use the official L4T base image from NVIDIA
FROM nvcr.io/nvidia/l4t-cuda:11.4.19-runtime
VOLUME /tmp/.X11-unix:/tmp/.X11-unix:rw
#
# Install any utils needed for execution
#
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
#
# Install nvidia-cuda-dev for CUDA developer packages
# Use nvidia-cuda if need CUDA runtime only
#
RUN apt-get update && apt-get install -y --no-install-recommends \
nvidia-cuda-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
#Update libraries
RUN ldconfig
#
# Setup environment variables
#
ENV CUDA_HOME="/usr/local/cuda"
ENV PATH="/usr/local/cuda/bin:$PATH"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment