Add Dockerfile

This commit is contained in:
tonkaew131 2025-05-28 17:14:56 +07:00
parent 4b854e4817
commit 44c061ec10

56
Dockerfile Normal file
View File

@ -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