-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: upgrade cuda version and add devcontainer for manylinux (#412)
- Loading branch information
Showing
17 changed files
with
156 additions
and
96 deletions.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.devcontainer/devcontainer.json → .devcontainer/devel/devcontainer.json
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
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,44 @@ | ||
ARG BASE_IMAGE=vectorchai/scalellm_manylinux:cuda12.4 | ||
FROM ${BASE_IMAGE} | ||
|
||
ARG USER=vscode | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG TORCH_VERSION=2.6.0 | ||
ARG CUDA_VERSION=12.4 | ||
ARG PYTHON_VERSION=3.12 | ||
|
||
# Run as non-root user | ||
RUN groupadd --gid ${GID} ${USER} \ | ||
&& useradd --uid ${UID} --gid ${GID} -m ${USER} --shell /bin/bash | ||
RUN echo ${USER} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USER} \ | ||
&& chmod 0440 /etc/sudoers.d/${USER} | ||
|
||
# Install tools | ||
RUN yum -y update && yum -y install \ | ||
htop \ | ||
vim \ | ||
jq \ | ||
gdb | ||
|
||
# Choose python 3.12 | ||
ENV PATH="/opt/python/cp312-cp312/bin:$PATH" | ||
|
||
# Install torch and other dependencies | ||
RUN python -m pip install --upgrade pip | ||
RUN pip install --upgrade pip | ||
RUN pip install torch==$TORCH_VERSION -i "https://download.pytorch.org/whl/cu${CUDA_VERSION//./}" | ||
RUN pip install numpy jinja2 | ||
RUN pip install --upgrade setuptools wheel | ||
|
||
# Set up bash prompt | ||
RUN cat <<EOT >> /home/${USER}/.bashrc | ||
parse_git_branch() { | ||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | ||
} | ||
export PS1="\[\e[0;33m\]\u@\h \w\[\e[m\]\[\033[32m\]\$(parse_git_branch)\[\033[00m\]$ " | ||
export CLICOLOR=1 | ||
export LSCOLORS=ExFxCxDxBxegedabagacad | ||
EOT | ||
|
||
ENTRYPOINT [ "/usr/bin/bash" ] |
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,69 @@ | ||
// For more config options, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "manylinux:cu12.4", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"BASE_IMAGE": "vectorchai/scalellm_manylinux:cuda12.4", | ||
"TORCH_VERSION": "2.6.0", | ||
"CUDA_VERSION": "12.4", | ||
"USER": "${localEnv:USER:vscode}", | ||
"UID": "${localEnv:UID:1000}", | ||
"GID": "${localEnv:GID:1000}" | ||
} | ||
}, | ||
// Access GPUs from inside the container | ||
"runArgs": [ | ||
"--gpus=all" | ||
], | ||
// Environment variables passed to the container. | ||
"containerEnv": { | ||
"HUGGING_FACE_HUB_TOKEN": "${localEnv:HUGGING_FACE_HUB_TOKEN}" | ||
}, | ||
// Run as the current user | ||
"remoteUser": "${localEnv:USER:vscode}", | ||
"containerUser": "${localEnv:USER:vscode}", | ||
"updateRemoteUserUID": true, | ||
// Ports should be forwarded from inside container to the local machine | ||
"forwardPorts": [], | ||
// For a full avaiable list, see https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
"ghcr.io/devcontainers/features/go:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cmake-tools", | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"llvm-vs-code-extensions.vscode-clangd", | ||
"ms-python.python", | ||
"ms-azuretools.vscode-docker", | ||
"ziruiwang.nvidia-monitor", | ||
"mutantdino.resourcemonitor" | ||
], | ||
"settings": { | ||
"extensions.verifySignature": false, | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"C_Cpp.clang_format_sortIncludes": true, | ||
"C_Cpp.default.intelliSenseMode": "linux-clang-x64", | ||
"C_Cpp.default.cppStandard": "c++17", | ||
"cmake.loggingLevel": "info", | ||
"cmake.configureOnOpen": false, | ||
"cmake.configureOnEdit": false, | ||
"cmake.automaticReconfigure": true, | ||
"cmake.ctest.allowParallelJobs": true, | ||
"python.testing.pytestEnabled": true, | ||
"python.analysis.inlayHints.pytestParameters": true, | ||
"files.watcherExclude": { | ||
"**/.git/objects/**": true, | ||
"**/.git/subtree-cache/**": true, | ||
"**/node_modules/*/**": true, | ||
"third_party/**": true, | ||
"build/**": true | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
Oops, something went wrong.