diff --git a/vendor/ngc-pytorch/Dockerfile.24.12-pytorch2.6-py312-cuda12.6 b/vendor/ngc-pytorch/Dockerfile.24.12-pytorch2.6-py312-cuda12.6 new file mode 100644 index 000000000..c4d01a49a --- /dev/null +++ b/vendor/ngc-pytorch/Dockerfile.24.12-pytorch2.6-py312-cuda12.6 @@ -0,0 +1,312 @@ +FROM nvcr.io/nvidia/pytorch:24.12-py3 +# NVIDIA NGC PyTorch with Python 3.12 + +ENV CODESERVER=4.96.4 +ENV DEBIAN_FRONTEND=noninteractive \ + MPLBACKEND=Svg \ + PIP_IGNORE_INSTALLED=0 \ + PYTHONUNBUFFERED=1 \ + LD_LIBRARY_PATH="/usr/local/lib/python3.12/dist-packages/torch/lib:/usr/local/lib/python3.12/dist-packages/torch_tensorrt/lib:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda-12.6:/usr/local/cuda-12.6/include:/usr/include/x86_64-linux-gnu:/opt/hpcx/ucc/lib" \ + PATH="/usr/local/lib/python3.12/dist-packages/torch_tensorrt/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ucx/bin:/opt/tensorrt/bin" \ + BNB_CUDA_VERSION=126 \ + CPLUS_INCLUDE_PATH=/usr/include/gdal \ + C_INCLUDE_PATH=/usr/include/gdal \ + LANG=C.UTF-8 + +#RUN apt remove libappstream3 +# +RUN apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + automake \ + bison \ + build-essential \ + bzip2 \ + ca-certificates \ + cabextract \ + chrpath \ + devscripts \ + dh-make \ + dirmngr \ + dkms \ +# dpatch \ + ethtool \ + fakeroot \ + ffmpeg \ + flex \ + fonts-nanum \ + fonts-nanum-coding \ + fonts-nanum-extra \ + g++ \ + gcc \ + gdal-bin \ + gfortran \ + gir1.2-gtk-3.0 \ + git \ + graphviz \ + htop \ + iputils-ping \ + libasound2-dev \ + libatlas-base-dev \ + libavcodec-dev \ + libavformat-dev \ + libboost-dev \ + libboost-filesystem-dev \ + libboost-system-dev \ + libcairo2-dev \ + libcurl4-openssl-dev \ + libdc1394-dev \ + libeigen3-dev \ + libfaac-dev \ + libfftw3-dev \ + libfreetype-dev \ + libfuse2 \ + libgdal-dev \ + libgeos++-dev \ + libgeos-dev \ + libgflags-dev \ + libgirepository1.0-dev \ + libglib2.0-0 \ + libgoogle-glog-dev \ + libgphoto2-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer1.0-dev \ + libgtk-3-dev \ + libhdf5-dev \ + libjemalloc-dev \ + libjpeg-dev \ + liblapack-dev \ + libmnl0 \ + libmp3lame-dev \ +# libmpdec-dev \ + libncurses-dev \ + libnl-3-200 \ + libnl-3-dev \ + libnl-route-3-200 \ + libnl-route-3-dev \ + libnlopt-dev \ + libnuma-dev \ + libopenblas-dev \ + libopencore-amrnb-dev \ + libopencore-amrwb-dev \ + libpci3 \ + libpng-dev \ + libportmidi-dev \ + libproj-dev \ + libprotobuf-dev \ + libsdl2-dev \ + libsdl-image1.2-dev \ + libsdl-mixer1.2-dev \ + libsdl-ttf2.0-dev \ + libsm6 \ + libsmpeg-dev \ + libssl-dev \ + libswscale-dev \ + libswresample-dev \ + libtbb-dev \ + libtheora-dev \ + libtiff-dev \ + libv4l-dev \ + libvorbis-dev \ + libx264-dev \ + libxext6 \ + libxine2-dev \ + libxml2-dev \ + libxrender-dev \ + libxrender1 \ + libxslt1-dev \ + libxvidcore-dev \ + libyaml-dev \ + libzmq3-dev \ + lintian \ + lsof \ + make \ + mercurial \ + media-types \ + mailcap \ +# mpich \ + ncurses-term \ + net-tools \ + openjdk-11-jdk \ + openssh-client \ + openssh-server \ + pbzip2 \ + pciutils \ + pdsh \ + pkg-config \ + proj-bin \ + protobuf-compiler \ + pv \ + python-is-python3 \ + python3-xkit \ + python3-gdal \ + screen-resolution-extra \ + sudo \ + subversion \ + swig \ + tk \ + unzip \ + v4l-utils \ + vim \ + x264 \ + xvfb \ + xz-utils \ + sudo \ + yarn \ + yasm \ + zip \ + tcl \ + udev +RUN mkdir -p /opt/oracle && \ + cd /opt/oracle && \ + wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip && \ + unzip instantclient-basiclite-linuxx64.zip && \ + rm -f instantclient-basiclite-linuxx64.zip && \ + cd /opt/oracle/instantclient* && \ + rm -f *jdbc* *occi* *mysql* *README *jar uidrvci genezi adrci && \ + echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && \ + ldconfig && \ + cd /tmp && \ + curl -sL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh && \ + bash /tmp/nodesource_setup.sh && \ + apt update ; apt install nodejs && \ +# Install CUDA + cuDNN + mkdir -p /usr/local/nvidia/lib && \ + ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.9.6.0 /usr/local/cuda/lib64/libcudnn.so && \ + ldconfig && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3 2 + +WORKDIR /tmp +RUN git clone -q --branch=v0.3.27 https://github.com/xianyi/OpenBLAS.git && \ + cd OpenBLAS && \ + make DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=48 FC=gfortran && \ + make install && \ +# install git-lfs + cd /tmp && \ + curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v3.5.1/git-lfs-linux-amd64-v3.5.1.tar.gz && \ + tar -zxf git-lfs-linux-amd64-v3.5.1.tar.gz && \ + cd git-lfs-3.5.1 && \ + bash install.sh && \ + git clone https://github.com/aristocratos/bashtop.git && \ + cd bashtop && \ + make install && \ + rm -rf /tmp/* + +RUN curl -fL https://github.com/cdr/code-server/releases/download/v$CODESERVER/code-server-$CODESERVER-linux-amd64.tar.gz \ + | tar -C /usr/local/lib -xz && \ + mv /usr/local/lib/code-server-$CODESERVER-linux-amd64 /usr/local/lib/code-server-$CODESERVER && \ + ln -s /usr/local/lib/code-server-$CODESERVER/bin/code-server /usr/local/bin/code-server + +# remove hwloc-like packages (ImportError: /opt/hpcx/ucc/lib/libucc.so.1: undefined symbol issue) +RUN apt-get purge -y hwloc-nox libhwloc-plugins +# install kss (temporary, when kss package's pyyaml version is updated, move to requirements.txt) +WORKDIR /tmp +RUN python3 -m pip install --upgrade pip setuptools wheel Cython +RUN cd /tmp && git clone https://github.com/hyunwoongko/kss.git && \ + cd kss && \ + sed -i 's/pyyaml==6.0/pyyaml>=6.0.2/' setup.py && \ + pip install . && \ + rm -rf /tmp/* + +COPY ./requirements.24.12.txt /tmp/requirements.txt +RUN python3 -m pip install --disable-pip-version-check --no-cache-dir -r requirements.txt +RUN python3 -m pip install datasets==3.0.1 multiprocess==0.70.16 + +RUN python3 -m pip install --no-cache-dir \ + mpi4py>=3.1.4 \ + nni>=2.10.1 \ + mlflow>=2.6.0 \ + scikit-nni>=0.2.1 + +RUN python3 -m pip install pytorch-lightning && \ + python3 -m pip install --no-cache-dir \ + torch-scatter \ + torch-sparse \ + torch-cluster \ + torch-spline-conv \ + torch-geometric + + +WORKDIR /tmp +RUN git clone -q https://github.com/TimDettmers/bitsandbytes.git && \ + cd /tmp/bitsandbytes && \ + cmake -B build -DBUILD_CUDA=ON -S . && \ + python setup.py install + +# Install ipython kernelspec +RUN python3 -m ipykernel install --display-name "PyTorch 2.6 (NGC 24.12/Python 3.12) on Backend.AI" && \ + cat /usr/local/share/jupyter/kernels/python3/kernel.json +# Backend.AI specifics +COPY ./service-defs /etc/backend.ai/service-defs +COPY ./runner-scripts/bootstrap.sh runner-scripts/setup_multinode.py /opt/container/ + +LABEL ai.backend.kernelspec="1" \ + ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \ + ai.backend.features="batch query uid-match user-input" \ + ai.backend.base-distro="ubuntu24.04" \ + ai.backend.accelerators="cuda" \ + ai.backend.resource.min.cpu="1" \ + ai.backend.resource.min.mem="1g" \ + ai.backend.resource.min.cuda.device=1 \ + ai.backend.resource.min.cuda.shares=0 \ + ai.backend.runtime-type="python" \ + ai.backend.runtime-path="/usr/bin/python" \ + ai.backend.service-ports="ipython:pty:3000,jupyter:http:8091,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:preopen:5000,nniboard:preopen:8080" +# Install Jupyterlab extensions + +RUN python3 -m pip install --no-cache-dir \ + jupyter_nbextensions_configurator>=0.6.3 \ + jupyter_contrib_nbextensions>=0.7.0 \ + jupyter-contrib-core>=0.4.2 \ + jupyter-highlight-selected-word>=0.2.0 \ + jupyter-server>=2.14.2 \ + jupyter_lsp>=2.2.0 +RUN python3 -m pip install --no-cache-dir \ + jupyterlab>=4.3.2 \ + jupyterlab-code-formatter>=3.0.2 \ + jupyterlab-hdf \ + jupyterlab-launcher \ + notebook + +RUN python3 -m pip install --no-cache-dir \ + jupyter-dash \ + jupyter-js-widgets-nbextension \ + jupyter-latex-envs \ + jupyter-packaging +RUN python3 -m pip install --no-cache-dir \ + jupyter-server-mathjax \ + jupyter-server-proxy==1.6.0 \ + jupyter-telemetry==0.1.0 \ + jupyter==1.0.0 \ + jupyter-client==8.4.0 \ + jupyter_bokeh==2.0.4 + +RUN python3 -m pip uninstall -y markupsafe && \ + python3 -m pip uninstall -y jupyter_core==5.3.0 && \ + python3 -m pip install markupsafe==2.0.1 &&\ + python3 -m pip install jsonschema[format,format-nongpl]==4.17.3 + +RUN python3 -m pip install widgetsnbextension jupyter_contrib_nbextensions jupyter_lsp markupsafe==2.0.1 && \ + jupyter lab build --dev-build=False --minimize=False && \ + jupyter nbextensions_configurator enable && \ + jupyter contrib nbextension install && \ + jupyter nbextension enable --py --sys-prefix widgetsnbextension && \ + jupyter serverextension enable --py jupyterlab --sys-prefix && \ + jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \ + jupyter serverextension enable --py jupyter_lsp && \ + jupyter labextension install --no-build @jupyterlab/toc && \ + jupyter nbextension enable execute_time/ExecuteTime && \ + jupyter nbextension enable toc2/main && \ + jupyter labextension install @jupyterlab/toc && \ + jupyter lab build + +RUN apt autoclean && \ + sed -i 's/source \/usr\/local\/nvm\/nvm.sh//' /etc/bash.bashrc && \ + ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \ + rm -f /tmp/*.whl /tmp/requirem* && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /root/.cache && \ + rm -rf /tmp/* + + +WORKDIR /home/work diff --git a/vendor/ngc-pytorch/requirements.24.12.txt b/vendor/ngc-pytorch/requirements.24.12.txt new file mode 100644 index 000000000..863b0930c --- /dev/null +++ b/vendor/ngc-pytorch/requirements.24.12.txt @@ -0,0 +1,280 @@ +Brotli==1.0.9 +EasyProcess==0.3 +Fiona==1.10.1 +Flask-Compress==1.12 +Flask==2.1.2 +GitPython==3.1.26 +JPype1>=0.7.2 +LunarCalendar==0.0.9 +PuLP==2.5.1 +PyJWT==2.4.0 +PyMeeus==0.5.10 +PyQt5-sip==12.16.1 +PyQt5==5.15.0 +PyQtWebEngine==5.15.2 +PyVirtualDisplay==1.3.2 +PyWavelets==1.1.1 +PythonWebHDFS==0.2.3 +QtPy==1.9.0 +SQLAlchemy==1.4.36 +Shapely==1.7.0 +accelerate>=0.22.0 +aiozmq==0.9.0 +albumentations==2.0.3 +alembic==1.7.6 +ansi2html==1.7.0 +anyio==3.4.0 +appdirs==1.4.4 +argo-workflows==3.6.0 +asgiref==3.4.1 +astor==0.8.1 +astroid==2.11.2 +#atlas>=0.3.0 +atomicwrites==1.3.0 +autopep8==1.5 +avro-python3==1.9.1 +bayesian-optimization==1.1.0 +benepar==0.2.0 +beniget==0.4.0 +black==22.6.0 +bokeh==3.6.2 +boltons==21.0.0 +boto3==1.27.1 +boto==2.49.0 +botocore==1.30.1 +branca==0.4.0 +catboost==1.2.7 +category-encoders==2.0.0 +certipy==0.1.3 +click-plugins +cligj==0.7.2 +clikit==0.6.1 +cmdstanpy==0.9.5 +colorama==0.4.4 +colored==1.4.3 +colour==0.1.5 +contextlib2==0.5.5 +convertdate==2.3.2 +coverage==4.5.4 +crashtest==0.3.0 +cvxpy==1.6.0 +dacite==1.6.0 +dash-core-components==2.0.0 +dash-html-components==2.0.0 +dash-table==5.0.0 +dash==2.3.1 +databricks-cli==0.17.2 +deap==1.4.1 +deepdish==0.3.6 +deepmerge==0.1.0 +deprecation==2.1.0 +descartes==1.1.0 +dill>=0.3.1.1 +dm-haiku==0.0.1 +docker==5.0.3 +docopt==0.6.0 +dopamine-rl==3.0.1 +dtreeviz==0.8.1 +easydict==1.9 +ecdsa==0.17.0 +ecos==2.0.7.post1 +eliot-tree==21.0.0 +eliot==1.14.0 +factor-analyzer==0.3.2 +fastavro>=0.21.4 +fasteners==0.15 +featuretools==1.31.0 +fire==0.3.1 +flake8==3.8.4 +flatbuffers==1.12 +folium==0.10.0 +fonttools>=4.33.3 +future==0.18.2 +gensim==3.8.0 +geopandas==0.5.1 +gin-config==0.3.0 +gitdb==4.0.5 +google-api-core==2.8.2 +google-pasta==0.1.8 +googleapis-common-protos==1.56.2 +graphviz==0.14 +greenlet==3.1.1 +gunicorn==20.1.0 +gym-notices==0.0.6 +gym>=0.17.3 +h5py>=2.10.0 +hdf5storage==0.1.15 +hijri-converter==2.2.3 +holidays==0.66 +httplib2==0.17.4 +httpstan==4.13.0 +huggingface-hub>=0.4.0 +hyperopt==0.1.2 +imageio==2.36.1 +imbalanced-learn==0.5.0 +ipywidgets==7.5.1 +iso8601==1.0.2 +isort==4.3.21 +itsdangerous==2.1.2 +jaxlib>=0.4.7 +jmespath==0.9.4 +json-tricks==3.15.5 +jsonpatch==1.32 +jsonpickle==1.5.0 +jsonpointer==2.3 +konlpy==0.5.2 +korean-lunar-calendar==0.2.1 +#kss==6.0.4 +kubernetes==22.6.0 +lazy-object-proxy==1.4.3 +lesscpy==0.14.0 +lightgbm==2.3.1 +lime==0.1.1.37 +locket==1.0.0 +lunardate==0.2.0 +lxml==5.3.0 +lz4==3.1.9 +maproxy==0.0.12 +marshmallow==3.14.1 +meshio==4.4.5 +mimeparse==0.1.3 +mlxtend==0.17.2 +mmdnn==0.3.1 +mne==0.20.5 +monotonic==1.4 +more-itertools>=7.2.0 +msgpack-python +multidict>=4.7.5 +multiprocess==0.70.17 +munch==2.5.0 +mypy-extensions==0.4.3 +namedlist==1.7 +nbclassic==0.3.6 +nltk==3.7 +nose==1.3.3 +notebook-shim==0.1.0 +numexpr>=2.7.3 +oauth2client==3.0.0 +oauthenticator==0.12.1 +opencv-python-headless==4.10.0.84 +opt-einsum==3.2.0 +osqp==0.6.7 +pamela==1.0.0 +pandasgui==0.2.7 +pastel==0.2.0 +path==16.2.0 +patsy>=0.5.2 +pbr==5.5.0 +pexpect==4.8.0 +peft>=0.5.0 +pillow>=9.0.1 +plaidml==0.7.0 +plotly==5.7.0 +portpicker==1.3.1 +progressbar==2.5 +prometheus-flask-exporter==0.20.3 +promise==2.3 +py-cpuinfo==5.0.0 +pyLDAvis==2.1.2 +pyaml==19.12.0 +pycairo==1.20.1 +pycodestyle==2.6.0 +pydocstyle==6.1.1 +pydotplus==2.0.2 +pyerfa==2.0.0.1 +pyflakes==2.2.0 +pygal==2.4.0 +pygame==2.6.1 +pyglet==1.5.0 +pygments>=2.12.0 +pylev==1.4.0 +pylint==2.13.5 +pyls-black==0.4.4 +pymongo==3.10.1 +pynput==1.7.6 +pyparsing>=3.0.9 +pyproj>=2.5.0 +pyrsistent==0.19.3 +pyshp==2.2.0 +pysimdjson==6.0.2 +pysocks==1.7.1 +pystan==3.10.0 +pytest-rerunfailures==11.1.2 +python-jose==3.3.0 +python-json-logger==2.0.2 +python-jsonrpc-server==0.4.0 +python-language-server==0.36.2 +python-lsp-jsonrpc==1.0.0 +python-lsp-server==1.4.1 +python-speech-features==0.6 +python-xlib==0.31 +pythran==0.11.0 +pytoolconfig==1.2.2 +pyvista==0.41.1 +pyvo==1.0 +qgrid==1.3.1 +qtconsole==4.7.1 +qudida==0.0.4 +querystring-parser==1.2.4 +rednose==1.3.0 +responses==0.21.0 +retrying==1.3.3 +rope==0.16.0 +ruamel.yaml.clib>=0.2.0 +ruamel.yaml>=0.17.17 +s3transfer==0.6.1 +sacrebleu==1.3.6 +sacred==0.8.1 +schema==0.7.1 +scikit-image==0.25.0 +scikit-optimize==0.10.2 +scikit-plot==0.3.7 +scikit-surprise==1.1.4 +scooby==0.5.5 +scs==3.2.7 +seaborn==0.10.0 +selenium==3.141.0 +semver==2.13.0 +sentence-transformers==2.7.0 +sentencepiece==0.2.0 +setuptools-git==1.2 +simpervisor==0.3 +simpleaudio==1.0.4 +simplejson==3.17.0 +smmap==3.0.5 +sniffio==1.2.0 +soynlp==0.0.493 +sqlparse==0.4.2 +statsmodels==0.14.0 +stopit==1.1.2 +tables==3.10.1 +tenacity==8.0.1 +termcolor==1.1.0 +termstyle==0.1.11 +test-generator==0.1.1 +testpath==0.6.0 +threadpool==1.3.2 +tifffile==2024.12.12 +tokenizers>=0.11.1 +tomlkit==0.10.2 +#torch-struct==0.5 +#torchfile==0.1.0 +transformers==4.47.1 +tweepy==3.8.0 +typeguard==2.13.3 +typing==3.7.4.1 +ujson==5.2.0 +update-checker==0.16 +uritemplate==3.0.1 +vecstack==0.4.0 +versioneer==0.18 +visdom>=0.1.8.9 +vtk==9.4.1 +webargs==8.1.0 +websocket-client==1.3.2 +websockets==10.3 +widgetsnbextension==3.5.1 +wrapt==1.14.1 +wslink==1.6.6 +yapf==0.29.0 +zope.interface==5.4.0 diff --git a/vendor/ngc-pytorch/service-defs/jupyter.json b/vendor/ngc-pytorch/service-defs/jupyter.json index 82330a7ed..f5cf7ce39 100644 --- a/vendor/ngc-pytorch/service-defs/jupyter.json +++ b/vendor/ngc-pytorch/service-defs/jupyter.json @@ -8,7 +8,15 @@ "c.NotebookApp.ip = \"0.0.0.0\"\n", "c.NotebookApp.port = {ports[0]}\n", "c.NotebookApp.token = \"\"\n", - "c.FileContentsManager.delete_to_trash = False\n" + "c.ServerApp.allow_root = True\n", + "c.ServerApp.ip = \"0.0.0.0\"\n", + "c.ServerApp.port = {ports[0]}\n", + "c.ServerApp.token = \"\"\n", + "c.ContentsManager.files_handler_class = None\n", + "c.FileContentsManager.delete_to_trash = False\n", + "c.NotebookApp.tornado_settings = {{'headers': {{'Content-Security-Policy': \"frame-ancestors * 'self' \"}}}}\n", + "c.ServerApp.tornado_settings = {{'headers': {{'Content-Security-Policy': \"frame-ancestors * 'self' \"}}}}\n", + "c.JupyterHub.tornado_settings = {{'headers': {{'Content-Security-Policy': \"frame-ancestors * 'self' \"}}}}\n" ] }, "ref": "jupyter_cfg" diff --git a/vendor/ngc-pytorch/service-defs/jupyterlab.json b/vendor/ngc-pytorch/service-defs/jupyterlab.json index 391459325..479a78f14 100644 --- a/vendor/ngc-pytorch/service-defs/jupyterlab.json +++ b/vendor/ngc-pytorch/service-defs/jupyterlab.json @@ -8,8 +8,15 @@ "c.NotebookApp.ip = \"0.0.0.0\"\n", "c.NotebookApp.port = {ports[0]}\n", "c.NotebookApp.token = \"\"\n", - "c.FileContentsManager.delete_to_trash = False\n" - ] + "c.ServerApp.allow_root = True\n", + "c.ServerApp.ip = \"0.0.0.0\"\n", + "c.ServerApp.port = {ports[0]}\n", + "c.ServerApp.token = \"\"\n", + "c.ContentsManager.files_handler_class = None\n", + "c.FileContentsManager.delete_to_trash = False\n", + "c.NotebookApp.tornado_settings = {{'headers': {{'Content-Security-Policy': \"frame-ancestors * 'self' \"}}}}\n", + "c.ServerApp.tornado_settings = {{'headers': {{'Content-Security-Policy': \"frame-ancestors * 'self' \"}}}}\n", + "c.JupyterHub.tornado_settings = {{'headers': {{'Content-Security-Policy': \"frame-ancestors * 'self' \"}}}}\n" ] }, "ref": "jupyter_cfg" }