Changes between Initial Version and Version 1 of kubeflow


Ignore:
Timestamp:
08/03/23 13:02:44 (19 months ago)
Author:
Cheng Gong
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kubeflow

    v1 v1  
     1
     2== Rancher Desktop
     3Download Rancher Desktop from https://rancherdesktop.io and open it on your local desktop.
     4
     5== Dockerhub Account
     6Create 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'
     7
     8Remember 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.
     9
     10== Building Custom Image
     11Specifically 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:
     12{{{
     13FROM public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/jupyter-tensorflow-cuda-full:v1.3.0-rc.1
     14
     15USER root
     16
     17RUN rm /etc/apt/sources.list.d/cuda.list
     18RUN rm /etc/apt/sources.list.d/nvidia-ml.list
     19
     20RUN apt-get update && apt-get install -y --no-install-recommends imagemagick libopenmpi-dev \
     21 && apt-get clean \
     22 && rm -rf /var/lib/apt/lists/*
     23
     24USER $NB_UID
     25
     26# install - requirements.txt
     27COPY --chown=jovyan:users requirements.txt /tmp/requirements.txt
     28RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir  -f \
     29 https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html \
     30 && rm -f /tmp/requirements.txt
     31}}}
     32
     33Within 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:
     34{{{
     35ipython
     36numpy
     37scipy
     38tensorflow
     39scikit-learn
     40matplotlib
     41scikit-optimize
     42seaborn
     43tensorflow-probability
     44torch
     45torchvision
     46torchaudio
     47jax
     48flax
     49optax
     50paddlepaddle-gpu==2.4.2.post112
     51jupyter
     52jupyterlab
     53notebook
     54pandas
     55mpi4py
     56deepxde
     57}}}
     58You can add or remove the packages you need as required.
     59
     60Now, to build the custom image (for Mac), enter the following in your command line: `docker buildx build --platform linux/amd64 -t <username>/deepxde:<tagname> .`
     61You 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.
     62
     63== Pushing to Dockerhub
     64After building the image, push to Dockerhub: `docker push <username>/deepxde:<tagname>`
     65
     66== Kubeflow
     67Go 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!
     68