-
Sebastian Schuch authoredSebastian Schuch authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Dockerfile 4.92 KiB
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
ENV NVARCH x86_64
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.8 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471"
ENV NV_CUDA_CUDART_VERSION 11.8.89-1
ENV NV_CUDA_COMPAT_PACKAGE cuda-compat-11-8
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.8"
ENV NV_CUDA_CUDART_VERSION 11.8.89-1
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg2 curl ca-certificates && \
curl -fsSLO https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH}/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
apt-get purge --autoremove -y curl \
&& rm -rf /var/lib/apt/lists/*
ENV CUDA_VERSION 11.8.0
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-11-8=${NV_CUDA_CUDART_VERSION} \
${NV_CUDA_COMPAT_PACKAGE} \
&& rm -rf /var/lib/apt/lists/*
# Required for nvidia-docker v1
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf \
&& echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
# set version label
ARG BUILD_DATE=
ARG VERSION=
ARG CODE_RELEASE=
ARG SQLITE_VERSION=
ARG DUCKDB_VERSION=
LABEL build_version="TWM vscode server:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sebastian.schuch@h-da.de"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"
RUN apt-get update -yq
RUN apt-get install curl -yq
RUN \
echo "**** install runtime dependencies ****" && \
apt-get update && \
apt-get install -y \
git \
g++ \
cmake \
ninja-build \
libssl-dev \
jq \
libatomic1 \
nano \
net-tools \
netcat \
make \
gcc \
wget \
python3 \
python3-venv \
python3-pip \
fossil \
graphviz \
sudo && \
echo "****** install sqlite ******" && \
wget -c https://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_VERSION}.tar.gz && \
mkdir sqlite3 && \
cd sqlite3 && \
tar xvfz ../sqlite-autoconf-${SQLITE_VERSION}.tar.gz && \
cd sqlite-autoconf-${SQLITE_VERSION} && \
./configure && \
make && \
make install && \
sqlite3 --version && \
cd ../.. && \
echo "**** install duckdb *****" && \
git clone --branch ${DUCKDB_VERSION} https://github.com/duckdb/duckdb.git && \
cd duckdb && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -G Ninja .. && \
ninja && \
ninja install && \
duckdb -s "INSTALL sqlite" && \
duckdb --version && \
cd ../.. && \
rm -rf duckdb && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
fi && \
mkdir -p /app/code-server && \
curl -o \
/tmp/code-server.tar.gz -L \
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
tar xf /tmp/code-server.tar.gz -C \
/app/code-server --strip-components=1 && \
echo "**** pip dependencies ****" && \
yes | pip install --upgrade boto3 tensorrt html2text spacy scrapy spacy-transformers spacy-html-tokenizer swifter yarl pyvis cudf-cu11 cuml-cu11 cugraph-cu11 diffusers accelerate torch matplotlib seaborn wordcloud scikit-learn sentence_transformers datasets nltk shap graphviz bertviz prettytable typing-extensions evaluate duckdb gensim pyLDAvis datamapplot hdbscan adjustText bertopic nbformat --extra-index-url=https://pypi.nvidia.com && \
python3 -m spacy download de_core_news_sm && \
python3 -m spacy download de_dep_news_trf && \
python3 -m spacy download en_core_web_sm && \
echo "**** clean up ****" && \
apt-get clean && \
pip cache purge && \
rm -rf \
/config/* \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files
COPY /root /
# ports and volumes
EXPOSE 8443
RUN apt-get update && apt-get install -yq xfce4 xfce4-terminal fonts-firacode fonts-noto-color-emoji autocutsel
RUN apt-get update && apt-get install -yq dialog apt-utils tigervnc-standalone-server tigervnc-common tigervnc-tools
RUN apt-get install -yq r-base
RUN apt-get install -yq gdebi-core
RUN cd /opt/ && wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.09.0-375-amd64.deb
RUN cd /opt/ && gdebi -n rstudio-server-2024.09.0-375-amd64.deb
RUN pip3 install jupyterlab && pip3 install notebook