Skip to content

Commit

Permalink
update latest - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruzzy77 committed Feb 26, 2025
1 parent 142f565 commit 5969002
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 205 deletions.
4 changes: 3 additions & 1 deletion .config/scripts/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ colorize() { # $1: color, $2: text

colorize main "Running post-create.sh..."
colorize sub "Current directory: $(pwd)"
colorize sub "Current user: $(whoami)"

#################################### APT #######################################

Expand All @@ -70,7 +71,8 @@ sudo apt-get autoremove -y && sudo apt-get autoclean
# Update .zshrc
colorize sub "Setting up oh-my-zsh..."

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Data-system-EH/user-content/main/zsh/install.sh)" -- --install-deps --no-gh
sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Data-system-EH/user-content/main/zsh/install.sh)" -- --deps-only -y
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Data-system-EH/user-content/main/zsh/install.sh)" -- --no-gh --no-git --no-ssh -y

# Change the default shell to zsh
sudo chsh -s $(which zsh)
Expand Down
131 changes: 59 additions & 72 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,80 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "ubuntu-cuda",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:jammy",
// "image": "nvidia/cuda:12.3.1-runtime-ubuntu22.04",
"image": "nvidia/cuda:12.8.0-runtime-ubuntu24.04",
"name": "ubuntu-cuda",
"image": "nvidia/cuda:12.8.0-runtime-ubuntu24.04",

// prettier-ignore
"runArgs": [
// prettier-ignore
"runArgs": [
"--name", "${localEnv:USER}-${localWorkspaceFolderBasename}",
"--gpus", "all"
],

"hostRequirements": {
"gpu": true
},
"hostRequirements": {
"gpu": true
},

"remoteEnv": {
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/.config/scripts/bin"
},
"containerEnv": {
"TZ": "Asia/Seoul",
"LANG": "ko_KR.UTF-8",
"LC_MESSAGES": "POSIX",
"NVIDIA_VISIBLE_DEVICES": "all",
"NVIDIA_DRIVER_CAPABILITIES": "compute,utility"
},

"containerEnv": {
"TZ": "Asia/Seoul",
"LANG": "ko_KR.UTF-8",
"LC_MESSAGES": "POSIX",
"NVIDIA_VISIBLE_DEVICES": "all",
"NVIDIA_DRIVER_CAPABILITIES": "compute,utility",
// env variable using in post-create.sh
"SKIP_PACKAGES_UPDATE": "false",
// groups to ignore when poetry install (see groups in pyproject.toml)
// "POETRY_WITHOUT_GROUPS": "pytorch,test"
"POETRY_WITHOUT_GROUPS": ""
},
"containerUser": "vscode",
"workspaceFolder": "/workspace/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/${localWorkspaceFolderBasename},type=bind,consistency=cached",

"workspaceFolder": "/home/vscode/workspace/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/workspace/${localWorkspaceFolderBasename},type=bind,consistency=cached",
"containerUser": "ubuntu",
// "remoteUser": "ubuntu",

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "zsh ${containerWorkspaceFolder}/.config/scripts/post-create.sh",
// "waitFor": "postCreateCommand",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/bin/bash -c '.config/scripts/post-create.sh'",
"waitFor": "postCreateCommand",

"shutdownAction": "stopContainer",
"shutdownAction": "stopContainer",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "vscode",
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/python:1": {
"installTools": false,
"version": "latest"
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true,
"installOhMyZsh": false
},
"ghcr.io/devcontainers/features/python:1": {
"installTools": false,
"version": "latest"
},
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
},
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/withfig/features/fig:1": {}
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-pylance",
"ms-python.vscode-python-envs",
"ms-toolsai.jupyter",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"tamasfe.even-better-toml",
"IronGeek.vscode-env",
"foxundermoon.shell-format"
]
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"tamasfe.even-better-toml",
"foxundermoon.shell-format"
]
}
}
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [9000],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [9000],

// Use 'portsAttributes' to set default properties for specific forwarded ports.
// More info: https://containers.dev/implementors/json_reference/#port-attributes
// "portsAttributes": {
// "9000": {
// "label": "Hello Remote World",
// "onAutoForward": "notify"
// }
// },
// Use 'portsAttributes' to set default properties for specific forwarded ports.
// More info: https://containers.dev/implementors/json_reference/#port-attributes
// "portsAttributes": {
// "9000": {
// "label": "Hello Remote World",
// "onAutoForward": "notify"
// }
// },

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
20 changes: 0 additions & 20 deletions .vscode/extensions.json

This file was deleted.

75 changes: 7 additions & 68 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,4 @@
{
// ::: Editor :::

"editor.rulers": [
80,
100,
120
],

"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,

// ## IntelliSense settings
"editor.suggest.showWords": false,
"editor.snippetSuggestions": "bottom",
"editor.acceptSuggestionOnEnter": "smart",

// ## Visuality settings
"editor.stickyScroll.enabled": false,
"editor.smoothScrolling": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": "on",
"editor.minimap.enabled": false,
"editor.renderWhitespace": "trailing",
"editor.inlayHints.enabled": "offUnlessPressed",

// ## Accessibility settings
"editor.linkedEditing": true,
"editor.dragAndDrop": false,
"editor.emptySelectionClipboard": false,

"editor.find.cursorMoveOnType": false,
"editor.find.autoFindInSelection": "multiline",

"files.insertFinalNewline": true,

"workbench.editorLargeFileConfirmation": 1500,

// ::: Language :::

/* #region //## Python */
Expand All @@ -56,17 +18,8 @@
"python.analysis.autoFormatStrings": true,
"python.analysis.autoImportCompletions": true,

"python.analysis.typeCheckingMode": "basic",
"python.analysis.useLibraryCodeForTypes": true,
"python.analysis.diagnosticMode": "workspace",

// "files.exclude": {
// "**/__pycache__": true,
// "**/.coverage": true,
// "**/.coverage.*": true,
// "**/.pytest_cache": true
// },

"python.testing.cwd": "${workspaceFolder}/src",
"python.testing.pytestArgs": [
".", // python.testing.cwd
Expand Down Expand Up @@ -100,12 +53,6 @@
"source.organizeImports": "always"
}
},
"ruff.format.args": [
"--config=.config/ruff.toml"
],
"ruff.lint.args": [
"--config=.config/ruff.toml"
],

"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
Expand All @@ -121,27 +68,19 @@
"cSpell.advanced.feature.useReferenceProviderWithRename": true,
"cSpell.advanced.feature.useReferenceProviderRemove": "/^#+\\s/"
},
"markdown.styles": [
".config/extras/github-markdown.css"
],
"markdown.styles": [".config/extras/github-markdown.css"],
// "markdown.preview.scrollEditorWithPreview": false,
// "markdown.preview.scrollPreviewWithEditor": false,

"markdownlint.config": {
"MD033": false, // no-inline-html
"MD034": false, // no-bare-urls
"MD041": false, // first-line-heading
"MD012": {
// no-multiple-blanks
"no-inline-html": false,
"no-bare-urls": false,
"first-line-heading": false,
"no-empty-links": false,
"no-alt-text": false,
"no-multiple-blanks": {
"maximum": 3
}
},
"markdownlint.ignore": [
"LICENSE"
],

"[env]": {
"editor.defaultFormatter": "IronGeek.vscode-env"
}

/* #endregion */
Expand Down
Loading

0 comments on commit 5969002

Please sign in to comment.