generated from rochacbruno/python-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init(llava,commavq); llava codebase added, commavq image generation a…
…nd trajectory visualization added
- Loading branch information
Showing
159 changed files
with
12,063 additions
and
259 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,53 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu-20.04 | ||
|
||
SHELL [ "bash", "-c" ] | ||
|
||
# update apt and install packages | ||
RUN apt update && \ | ||
apt install -yq \ | ||
ffmpeg \ | ||
dkms \ | ||
build-essential | ||
|
||
# add user tools | ||
RUN sudo apt install -yq \ | ||
jq \ | ||
jp \ | ||
tree \ | ||
tldr | ||
|
||
# add git-lfs and install | ||
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash && \ | ||
sudo apt-get install -yq git-lfs && \ | ||
git lfs install | ||
|
||
############################################ | ||
# Setup user | ||
############################################ | ||
|
||
USER vscode | ||
|
||
# install azcopy, a tool to copy to/from blob storage | ||
# for more info: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs-upload#upload-a-file | ||
RUN cd /tmp && \ | ||
wget https://azcopyvnext.azureedge.net/release20230123/azcopy_linux_amd64_10.17.0.tar.gz && \ | ||
tar xvf azcopy_linux_amd64_10.17.0.tar.gz && \ | ||
mkdir -p ~/.local/bin && \ | ||
mv azcopy_linux_amd64_10.17.0/azcopy ~/.local/bin && \ | ||
chmod +x ~/.local/bin/azcopy && \ | ||
rm -rf azcopy_linux_amd64* | ||
|
||
# Setup conda | ||
RUN cd /tmp && \ | ||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ | ||
bash ./Miniconda3-latest-Linux-x86_64.sh -b && \ | ||
rm ./Miniconda3-latest-Linux-x86_64.sh | ||
|
||
# Install dotnet | ||
RUN cd /tmp && \ | ||
wget https://dot.net/v1/dotnet-install.sh && \ | ||
chmod +x dotnet-install.sh && \ | ||
./dotnet-install.sh --channel 7.0 && \ | ||
./dotnet-install.sh --channel 3.1 && \ | ||
rm ./dotnet-install.sh | ||
|
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,2 @@ | ||
SAMPLE_ENV_VAR1="Sample Value" | ||
SAMPLE_ENV_VAR2=332431bf-68bf |
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,71 @@ | ||
{ | ||
"name": "LLaVA", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": {} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
"ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
"ghcr.io/azure/azure-dev/azd:0": {}, | ||
"ghcr.io/devcontainers/features/powershell:1": {}, | ||
"ghcr.io/devcontainers/features/common-utils:2": {}, | ||
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {}, | ||
}, | ||
// "forwardPorts": [], | ||
"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": "yapf", | ||
"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" | ||
}, | ||
} | ||
}, | ||
"extensions": [ | ||
"aaron-bond.better-comments", | ||
"eamodio.gitlens", | ||
"EditorConfig.EditorConfig", | ||
"foxundermoon.shell-format", | ||
"GitHub.copilot-chat", | ||
"GitHub.copilot-labs", | ||
"GitHub.copilot", | ||
"lehoanganh298.json-lines-viewer", | ||
"mhutchie.git-graph", | ||
"ms-azuretools.vscode-docker", | ||
"ms-dotnettools.dotnet-interactive-vscode", | ||
"ms-python.flake8", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"njpwerner.autodocstring", | ||
"redhat.vscode-yaml", | ||
"stkb.rewrap", | ||
"yzhang.markdown-all-in-one", | ||
] | ||
} | ||
}, | ||
"mounts": [], | ||
"runArgs": [ | ||
"--gpus", | ||
"all", | ||
// "--ipc", | ||
// "host", | ||
"--ulimit", | ||
"memlock=-1", | ||
"--env-file", | ||
".devcontainer/devcontainer.env" | ||
], | ||
// "remoteUser": "root" | ||
} |
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,45 @@ | ||
git config --global safe.directory '*' | ||
git config --global core.editor "code --wait" | ||
git config --global pager.branch false | ||
|
||
# Set AZCOPY concurrency to auto | ||
echo "export AZCOPY_CONCURRENCY_VALUE=AUTO" >> ~/.zshrc | ||
echo "export AZCOPY_CONCURRENCY_VALUE=AUTO" >> ~/.bashrc | ||
|
||
# Activate conda by default | ||
echo ". /home/vscode/miniconda3/bin/activate" >> ~/.zshrc | ||
echo ". /home/vscode/miniconda3/bin/activate" >> ~/.bashrc | ||
|
||
# Use llava environment by default | ||
echo "conda activate llava" >> ~/.zshrc | ||
echo "conda activate llava" >> ~/.bashrc | ||
|
||
# Add dotnet to PATH | ||
echo 'export PATH="$PATH:$HOME/.dotnet"' >> ~/.bashrc | ||
echo 'export PATH="$PATH:$HOME/.dotnet"' >> ~/.zshrc | ||
|
||
# Create and activate llava environment | ||
source /home/vscode/miniconda3/bin/activate | ||
conda create -y -q -n llava python=3.10 | ||
conda activate llava | ||
|
||
# Install Nvidia Cuda Compiler | ||
conda install -y -c nvidia cuda-compiler | ||
|
||
pip install pre-commit==3.0.2 | ||
|
||
# Install package locally | ||
pip install --upgrade pip # enable PEP 660 support | ||
pip install -e . | ||
|
||
# Install additional packages for training | ||
pip install -e ".[train]" | ||
pip install flash-attn --no-build-isolation | ||
|
||
# Download checkpoints to location outside of the repo | ||
git clone https://huggingface.co/liuhaotian/llava-v1.5-7b ~/llava-v1.5-7b | ||
|
||
# Commented because it is unlikely for users to have enough local GPU memory to load the model | ||
# git clone https://huggingface.co/liuhaotian/llava-v1.5-13b ~/llava-v1.5-13b | ||
|
||
echo "postCreateCommand.sh COMPLETE!" |
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,21 @@ | ||
# The .dockerignore file excludes files from the container build process. | ||
# | ||
# https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
|
||
# Exclude Git files | ||
.git | ||
.github | ||
.gitignore | ||
|
||
# Exclude Python cache files | ||
__pycache__ | ||
.mypy_cache | ||
.pytest_cache | ||
.ruff_cache | ||
|
||
# Exclude Python virtual environment | ||
/venv | ||
|
||
# Exclude some weights | ||
/openai | ||
/liuhaotian |
Oops, something went wrong.