-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Add base image Signed-off-by: Ce Gao <[email protected]> * chore: Merge some operations into the base image Signed-off-by: Ce Gao <[email protected]> * chore: Add some dev tools Signed-off-by: Ce Gao <[email protected]> * fix: Fix lint Signed-off-by: Ce Gao <[email protected]> * fix: Fix test cases Signed-off-by: Ce Gao <[email protected]> * fix: Fix test cases Signed-off-by: Ce Gao <[email protected]> * fix: Use a email group Signed-off-by: Ce Gao <[email protected]>
- Loading branch information
Showing
12 changed files
with
159 additions
and
84 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,2 @@ | ||
build.sh | ||
*.Dockerfile |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT_DIR=`dirname $0` | ||
|
||
cd ${ROOT_DIR} | ||
# ubuntu 22.04 build require moby/buildkit version greater than 0.8.1 | ||
if ! docker buildx inspect cuda; then | ||
docker buildx create --use --platform linux/x86_64,linux/arm64,linux/ppc64le --driver-opt image=moby/buildkit:v0.10.3 --name cuda --node cuda | ||
fi | ||
docker buildx build --build-arg IMAGE_NAME=docker.io/nvidia/cuda \ | ||
--build-arg ENVD_VERSION=0.0.1-alpha.5 \ | ||
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-ssh-from-scratch \ | ||
--build-arg HTTP_PROXY=${HTTP_PROXY} \ | ||
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \ | ||
--pull --push --platform linux/x86_64,linux/arm64 \ | ||
-t gaocegege/python:3.8-ubuntu20.04-cuda11.6-cudnn8 \ | ||
-f python3.8-ubuntu20.04-cuda11.6.Dockerfile . | ||
docker buildx build \ | ||
--build-arg ENVD_VERSION=0.0.1-alpha.5 \ | ||
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-ssh-from-scratch \ | ||
--build-arg HTTP_PROXY=${HTTP_PROXY} \ | ||
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \ | ||
--pull --push --platform linux/x86_64,linux/arm64 \ | ||
-t gaocegege/python:3.8-ubuntu20.04 \ | ||
-f python3.8-ubuntu20.04.Dockerfile . | ||
cd - > /dev/null |
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,84 @@ | ||
ARG IMAGE_NAME | ||
ARG ENVD_VERSION | ||
ARG ENVD_SSH_IMAGE | ||
FROM ${IMAGE_NAME}:11.6.2-runtime-ubuntu20.04 as base | ||
|
||
ENV NV_CUDA_LIB_VERSION "11.6.2-1" | ||
|
||
FROM base as base-amd64 | ||
|
||
ENV NV_CUDA_CUDART_DEV_VERSION 11.6.55-1 | ||
ENV NV_NVML_DEV_VERSION 11.6.55-1 | ||
ENV NV_LIBCUSPARSE_DEV_VERSION 11.7.2.124-1 | ||
ENV NV_LIBNPP_DEV_VERSION 11.6.3.124-1 | ||
ENV NV_LIBNPP_DEV_PACKAGE libnpp-dev-11-6=${NV_LIBNPP_DEV_VERSION} | ||
|
||
ENV NV_LIBCUBLAS_DEV_VERSION 11.9.2.110-1 | ||
ENV NV_LIBCUBLAS_DEV_PACKAGE_NAME libcublas-dev-11-6 | ||
ENV NV_LIBCUBLAS_DEV_PACKAGE ${NV_LIBCUBLAS_DEV_PACKAGE_NAME}=${NV_LIBCUBLAS_DEV_VERSION} | ||
|
||
ENV NV_NVPROF_VERSION 11.6.124-1 | ||
ENV NV_NVPROF_DEV_PACKAGE cuda-nvprof-11-6=${NV_NVPROF_VERSION} | ||
|
||
ENV NV_LIBNCCL_DEV_PACKAGE_NAME libnccl-dev | ||
ENV NV_LIBNCCL_DEV_PACKAGE_VERSION 2.12.10-1 | ||
ENV NCCL_VERSION 2.12.10-1 | ||
ENV NV_LIBNCCL_DEV_PACKAGE ${NV_LIBNCCL_DEV_PACKAGE_NAME}=${NV_LIBNCCL_DEV_PACKAGE_VERSION}+cuda11.6 | ||
FROM base as base-arm64 | ||
|
||
ENV NV_CUDA_CUDART_DEV_VERSION 11.6.55-1 | ||
ENV NV_NVML_DEV_VERSION 11.6.55-1 | ||
ENV NV_LIBCUSPARSE_DEV_VERSION 11.7.2.124-1 | ||
ENV NV_LIBNPP_DEV_VERSION 11.6.3.124-1 | ||
ENV NV_LIBNPP_DEV_PACKAGE libnpp-dev-11-6=${NV_LIBNPP_DEV_VERSION} | ||
|
||
ENV NV_LIBCUBLAS_DEV_PACKAGE_NAME libcublas-dev-11-6 | ||
ENV NV_LIBCUBLAS_DEV_VERSION 11.9.2.110-1 | ||
ENV NV_LIBCUBLAS_DEV_PACKAGE ${NV_LIBCUBLAS_DEV_PACKAGE_NAME}=${NV_LIBCUBLAS_DEV_VERSION} | ||
|
||
ENV NV_NVPROF_VERSION 11.6.124-1 | ||
ENV NV_NVPROF_DEV_PACKAGE cuda-nvprof-11-6=${NV_NVPROF_VERSION} | ||
|
||
ENV NV_LIBNCCL_DEV_PACKAGE_NAME libnccl-dev | ||
ENV NV_LIBNCCL_DEV_PACKAGE_VERSION 2.12.10-1 | ||
ENV NCCL_VERSION 2.12.10-1 | ||
ENV NV_LIBNCCL_DEV_PACKAGE ${NV_LIBNCCL_DEV_PACKAGE_NAME}=${NV_LIBNCCL_DEV_PACKAGE_VERSION}+cuda11.6 | ||
|
||
FROM ${ENVD_SSH_IMAGE}:${ENVD_VERSION} AS envd | ||
|
||
FROM base-${TARGETARCH} | ||
|
||
ARG TARGETARCH | ||
|
||
LABEL maintainer "envd-maintainers <[email protected]>" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends --no-install-suggests --fix-missing bash-static \ | ||
apt-utils libtinfo5 libncursesw5 && \ | ||
apt-get install -y --no-install-recommends --no-install-suggests --fix-missing bash-static \ | ||
cuda-cudart-dev-11-6=${NV_CUDA_CUDART_DEV_VERSION} \ | ||
cuda-command-line-tools-11-6=${NV_CUDA_LIB_VERSION} \ | ||
cuda-minimal-build-11-6=${NV_CUDA_LIB_VERSION} \ | ||
cuda-libraries-dev-11-6=${NV_CUDA_LIB_VERSION} \ | ||
cuda-nvml-dev-11-6=${NV_NVML_DEV_VERSION} \ | ||
${NV_NVPROF_DEV_PACKAGE} \ | ||
${NV_LIBNPP_DEV_PACKAGE} \ | ||
libcusparse-dev-11-6=${NV_LIBCUSPARSE_DEV_VERSION} \ | ||
${NV_LIBCUBLAS_DEV_PACKAGE} \ | ||
${NV_LIBNCCL_DEV_PACKAGE} \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends --no-install-suggests --fix-missing bash-static \ | ||
# envd dependencies | ||
python3 curl openssh-client git tini sudo python3-pip zsh vim \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=envd /usr/bin/envd-ssh /var/envd/bin/envd-ssh | ||
|
||
# Keep apt from auto upgrading the cublas and nccl packages. See https://gitlab.com/nvidia/container-images/cuda/-/issues/88 | ||
RUN apt-mark hold ${NV_LIBCUBLAS_DEV_PACKAGE_NAME} ${NV_LIBNCCL_DEV_PACKAGE_NAME} | ||
|
||
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs |
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 @@ | ||
ARG ENVD_VERSION | ||
ARG ENVD_SSH_IMAGE | ||
FROM ubuntu:20.04 as base | ||
|
||
FROM base as base-amd64 | ||
|
||
FROM base as base-arm64 | ||
|
||
FROM ${ENVD_SSH_IMAGE}:${ENVD_VERSION} AS envd | ||
|
||
FROM base-${TARGETARCH} | ||
|
||
ARG TARGETARCH | ||
|
||
LABEL maintainer "envd-maintainers <[email protected]>" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends --no-install-suggests --fix-missing bash-static \ | ||
apt-utils libtinfo5 libncursesw5 \ | ||
# envd dependencies | ||
python3 curl openssh-client git tini sudo python3-pip zsh vim \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=envd /usr/bin/envd-ssh /var/envd/bin/envd-ssh |
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