TouchTerrain_jupyter_for_starters.ipynb
) will hopefully make is easy for beginners to work through the workflow of creating a 3D terrain model file in standalone.(Note: I'm not using a data folder mounted as a volume on the container here b/c I find it easier to use jupyter's upload/download to transfer data to and fro the container.)
In Docker Desktop, delete any older container or image of touchterrain you might have.
To get the image, go into a terminal on your "outside" OS (Terminal.app for MacOS, Powershell for Windows), while the docker app is running and type:
docker pull chharding/touchterrain_jupyter
this will pull the already built image from dockerhub. The image is about 2 Gb to download but will require 5 Gb disk space. (You can do this in any folder, the image will be put into a special docker folder on your system, not the current folder.)
To create a container running on your PC from this image, type:
docker run -it -p 8888:8888 --name touchterrain_container chharding/touchterrain_jupyter
-it
means interactive, meaning your outside OS terminal will turn into a within-container (Linux) terminal
-p 8888:8888
sets the port through with your local browser will communicate with jupyter running in the container
--name touchterrain_container
sets the name of the container, otherwise its random.
chharding/touchterrain_jupyter
is the image you downloaded (pulled) earlier
you will now be "inside" the container, i.e. what you type is actually run inside a virtual Linux box. You will see that your prompt has changed to root. Stay inside this shell and do not open a new shell by clicking on the CLI button right to the container in the Docker Desktop app!
before you can run jupyter and load your notebook, you have to install the touchterrain module. Run the install_touchterrain.sh
shell script sitting in /TouchTerrain
: (note the leading ./
. Hit tab after typing in ./in
to get a text completion to ./install_touchterrain.sh
)
./install_touchterrain.sh
/TouchTerrain/standalone
. The standalone folder contains the notebook you will later run. STLs created via the notebook will also be in a subfolder in standalone, use jupyter's download functionality to copy them from the container to your OS../update_touchterrain.sh
instead. /TouchTerrain
)./run_touchterrain.sh
You will see a URL starting with 127.0.0.1, something like http://127.0.0.1:8888/?token=ea78c44799a531743
Copy/paste that URL into your browser. If needed, use the token (the stuff after token=) to log in.
There are two notebooks:
TouchTerrain_standalone_jupyter_notebook.ipynb
: This is the standard notebook and requires jupyter and Python knowledgeTouchTerrain_jupyter_for_starters.ipynb
: This notebook is recommended for beginners. It is somewhat simplified and explains a lot of details that will hopefully be useful for those with little to no jupyter experience.Note: Before you start you might want to make a copy of the original notebook and work on the copy instead.
Click on the notebook (.ipynb file) to run it.
Read the instructions (ignore anything with install as you have everything already installed)
You MUST run ee.Authenticate()
at least once to access online DEM data or the interactive in-cell map geemap
. You can ignore this if you only want to process raster DEM data. Look at EarthEngine_authentication_guide.md You will need a Google account to set up a EarthEngine project to generate a token that you can use to create a keyfile.
You can use geemap
to digitize your printarea and k3d
to preview your STL (Dec. 8, 2022: this may not work anymore ...)
If you want to stop the jupyter server, hit Control-c and then y. This will return you to the container terminal. Use ./run_touchterrain.sh
to start the server again.
"importedDEM"
setting to point to this file. Same for using a bottom relief image.If you just want to pull the image from dockerhub and run it as a container on your PC, ignore this!
This only applies if you want to build an image yourself, possible with a modified Dockerfile. Here I'm tagging the image so it belongs to my dockerhub id (chharding) and pushing it to doockerhub. You will either need to have you own dockerhub id or omit -t chharding/touchterrain_jupyter:latest
to build a local image (and not push it!)
Inside the project root folder, type:
docker build -t chharding/touchterrain_jupyter:latest .
docker push chharding/touchterrain_jupyter:latest