- PyTorch GPU boilerplate for deep learning projects.
- Also includes Ruff, Pytest, Pre-commit, Poetry set-up for a development environment.
- [Branch: devcontainer] Provides a devcontainer set-up for Visual Studio Code Remote Development and GitHub Codespaces.
|
|
|
|
![]() |
|
|
|
- Install Visual Studio Code and Remote Development Extension Pack.
- Connect to a (Case 1) Remote-SSH server or create a new (Case 2) Codespaces with this repository.
- (Recommend) How to Connect Remote-SSH
- Install GitHub Codespaces Extension and Create a new Codespaces with this repository. important! Check you have access to Codespaces plan. (free accounts does not support GPU machines.)
- โน๏ธ Be aware that this devcontainer is set up for a GPU environment. you may need a gpu-enabled remote server or Codespaces.
- Click the
Use this template
button on the top-right of this repository. - Click the
Create repository
button.
-
Open the repository in Remote Server or Codespaces.
-
Click the
Reopen in Container
button to open the repository in the devcontainer.- You may need to install Docker if you are using a local machine.
- check
devcontainer.json
for more information about the devcontainer settings.-
container environment
key description default TZ
Timezone Asia/Seoul
LANG
Locale ko_KR.UTF-8
LC_MESSAGES
Locale (POSIX for command output as eng) POSIX
NVIDIA_VISIBLE_DEVICES
GPU device id (0, 1, 2, ...) all
NVIDIA_DRIVER_CAPABILITIES
GPU driver capabilities compute,utility
-
-
A new container will be created and the repository will be opened in the new container. (It may take a few minutes to build the container for the first time.)
-
(Optional) Click the
Reopen in Workspace
button to open the repository in the workspace.- Additional extension settings will be applied to the workspace.
- Check Poetry Managing Dependencies for more information.
- Check Node Package Manager for more information.
note You don't need to set up git on the devcontainer. The git configuration on the local machine will be reflected to the devcontainer automatically.
-
Generate a new SSH key and add it to your GitHub account.
# Creates a new ssh key, using the provided email as a label ssh-keygen -t ed25519 -C "your@github_email" # Start the ssh-agent in the background (if not already running) eval "$(ssh-agent -s)" # Add your SSH private key to the ssh-agent ssh-add PATH/TO/.SSH/PRIVATE_KEY # e.g. ~/.ssh/id_ed25519
-
Add the SSH key to your GitHub account.
-
Set global git configuration for signing.
git config --global gpg.format ssh git config --global gpg.ssh.defaultKeyCommand "ssh-add -L"
-
Add following line to your
settings.json
in Visual Studio Code."git.enableCommitSigning": true
-
Or you can enable it in the git configuration.
git config commit.gpgSign true
-
-
Set your user name and email address to your GitHub username and email.
git config --local user.name "your_github_username" git config --local user.email "your@github_email"