Version 2 (modified by 5 months ago) ( diff ) | ,
---|
Rancher Desktop
Download Rancher Desktop from https://rancherdesktop.io and open it on your local desktop.
Dockerhub Account
Create a Dockerhub account on https://hub.docker.com. You will also want to create a repository to push the custom images you build. Call it 'deepxde'
Remember to log in to your dockerhub account from your desktop. Enter docker login
in your command line, and enter your password. You will only have to do this once.
Building Custom Image
Specifically for the DeepXDE package, you will need to create a folder on your local desktop, deepxde
. Within this folder, create a dockerfile with vim Dockerfile
and enter the following:
FROM public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/jupyter-tensorflow-cuda-full:v1.3.0-rc.1 USER root RUN rm /etc/apt/sources.list.d/cuda.list RUN rm /etc/apt/sources.list.d/nvidia-ml.list RUN apt-get update && apt-get install -y --no-install-recommends imagemagick libopenmpi-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* USER $NB_UID # install - requirements.txt COPY --chown=jovyan:users requirements.txt /tmp/requirements.txt RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir -f \ https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html \ && rm -f /tmp/requirements.txt
Within the same deepxde
folder on your local desktop, create a new file called requirements.txt
by entering the following in command line: vim requirements.txt
. Here are some packages you may want to include:
ipython numpy scipy tensorflow scikit-learn matplotlib scikit-optimize seaborn tensorflow-probability torch torchvision torchaudio jax flax optax paddlepaddle-gpu==2.4.2.post112 jupyter jupyterlab notebook pandas mpi4py deepxde mat73
You can add or remove the packages you need as required.
Now, to build the custom image (for Mac), enter the following in your command line: docker buildx build --platform linux/amd64 -t <username>/deepxde:<tagname> .
You will need to use your dockerhub username and you can choose any tagname you want. For instance, your tagname could be v1
for version 1 of the image you are building.
Pushing to Dockerhub
After building the image, push to Dockerhub: docker push <username>/deepxde:<tagname>
Kubeflow
Go to the Notebooks tab and create a new server. Select custom image
and enter <username>/deepxde:<tagname>
. Choose the number of CPUs and GPUs (NVIDIA), also use your existing volume. Once this is done, you will want to launch the server!