-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9fea23
commit 3350606
Showing
4 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Control the number of GPUs visible to scripts | ||
CUDA_VISIBLE_DEVICES=0,1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python 3", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", | ||
"features": { | ||
"ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
"ghcr.io/devcontainers/features/common-utils:2": {}, | ||
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {} | ||
}, | ||
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.analysis.autoImportCompletions": true, | ||
"python.analysis.autoImportUserSymbols": true, | ||
"python.defaultInterpreterPath": "~/miniconda3/envs/llava/bin/python", | ||
"python.formatting.provider": "black", | ||
"python.linting.enabled": true, | ||
"python.linting.flake8Enabled": true, | ||
"isort.check": true, | ||
"dev.containers.copyGitConfig": true, | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "/usr/bin/zsh" | ||
}, | ||
}, | ||
"[python]": {} | ||
}, | ||
"extensions": [ | ||
"aaron-bond.better-comments", | ||
"alefragnani.Bookmarks", | ||
"dotenv.dotenv-vscode", | ||
"eamodio.gitlens", | ||
"EditorConfig.EditorConfig", | ||
"foxundermoon.shell-format", | ||
"GitHub.copilot", | ||
"lehoanganh298.json-lines-viewer", | ||
"mechatroner.rainbow-csv", | ||
"mhutchie.git-graph", | ||
"ms-azuretools.vscode-docker", | ||
"ms-dotnettools.dotnet-interactive-vscode", | ||
"ms-python.black-formatter", | ||
"ms-python.flake8", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"njpwerner.autodocstring", | ||
"redhat.vscode-yaml", | ||
"stkb.rewrap", | ||
"tamasfe.even-better-toml", | ||
"yzhang.markdown-all-in-one" | ||
] | ||
} | ||
}, | ||
"runArgs": [ | ||
"--gpus", | ||
"all", | ||
// "--ipc", | ||
// "host", | ||
"--ulimit", | ||
"memlock=-1", | ||
"--env-file", | ||
".devcontainer/devcontainer.env" | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
git config --global safe.directory '*' | ||
git config --global core.editor "code --wait" | ||
git config --global pager.branch false | ||
|
||
# Activate conda by default | ||
echo "source /home/vscode/miniconda3/bin/activate" >> ~/.zshrc | ||
echo "source /home/vscode/miniconda3/bin/activate" >> ~/.bashrc | ||
|
||
# Use environment by default | ||
echo "conda activate mathvista" >> ~/.zshrc | ||
echo "conda activate mathvista" >> ~/.bashrc | ||
|
||
# Activate conda on current shell | ||
source /home/vscode/miniconda3/bin/activate | ||
|
||
# Create and activate mathvista environment | ||
conda create -n mathvista python=3.10 -y | ||
conda activate mathvista | ||
|
||
# Install Nvidia Cuda Compiler | ||
CUDA_VERSION=11.8 | ||
conda install -y -c nvidia cuda=$CUDA_VERSION cuda-nvcc=$CUDA_VERSION | ||
|
||
pip install --upgrade pip | ||
|
||
echo "postCreateCommand.sh completed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for more information: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# https://containers.dev/guide/dependabot | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
schedule: | ||
interval: weekly |