From 44c061ec1067e2b5e1917461402cb77989154d28 Mon Sep 17 00:00:00 2001 From: tonkaew131 Date: Wed, 28 May 2025 17:14:56 +0700 Subject: [PATCH] Add Dockerfile --- Dockerfile | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2329e5b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,56 @@ +ARG TRITON_RELEASE +FROM nvcr.io/nvidia/tritonserver:${TRITON_RELEASE}-py3-sdk + +ARG MINICONDA3_VERSION=latest +ENV MINICONDA3_VERSION=${MINICONDA3_VERSION} + +ARG GO_VERSION=1.24.3 +ENV GO_VERSION=${GO_VERSION} + +ARG SINGULARITY_VERSION=4.3.1 +ENV SINGULARITY_VERSION=${SINGULARITY_VERSION} + +RUN echo -e '\n\n\n' >> ~/.bashrc +RUN apt-get update && apt-get upgrade -y + +# Add conda +RUN mkdir -p ~/.miniconda3 && \ + wget https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA3_VERSION}-Linux-x86_64.sh -O ~/.miniconda3/miniconda.sh && \ + bash ~/.miniconda3/miniconda.sh -b -u -p ~/.miniconda3 && \ + rm ~/.miniconda3/miniconda.sh +RUN echo 'source ~/.miniconda3/bin/activate' >> ~/.bashrc + +# Add Go +RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \ + rm -rf /usr/local/go && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz && \ +rm go${GO_VERSION}.linux-amd64.tar.gz +RUN echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc +ENV PATH="/usr/local/go/bin:${PATH}" + +# Add Singularity +RUN apt-get update && apt-get install -y \ + autoconf \ + automake \ + cryptsetup \ + fuse2fs \ + git \ + fuse \ + libfuse-dev \ + libseccomp-dev \ + libtool \ + pkg-config \ + runc \ + squashfs-tools \ + squashfs-tools-ng \ + uidmap \ + wget \ + zlib1g-dev \ + libsubid-dev +RUN wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-ce-${SINGULARITY_VERSION}.tar.gz && \ + tar -xzf singularity-ce-${SINGULARITY_VERSION}.tar.gz && \ + cd singularity-ce-${SINGULARITY_VERSION} && \ + ./mconfig && \ + make -C builddir && \ + make -C builddir install && \ + cd .. && \ + rm -rf singularity-ce-${SINGULARITY_VERSION} singularity-ce-${SINGULARITY_VERSION}.tar.gz