From cd03ddd3a32dda79bf9a2888f7085746bbbadbd3 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Mon, 20 Jan 2025 09:21:20 -0700 Subject: [PATCH 01/12] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b9d367..0ff649d 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,17 @@ For internal users working on a JS2 VM created using the OFO Dev CACAO template, to switch to a conda environment with a current Metashape python package preinstalled and configured. ### Docker -Docker is a way to run software encapsulated with all the dependencies. You must install `docker` (instuctions [here](https://docs.docker.com/engine/install/)), and if you want to use GPUs for processing, also install the `nvidia-container-toolkit` (instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)). +Docker, a type of software containerization, is an alternative way to run software where you don't need to install software in the traditional sense. Docker packages up the code and all its environment dependencies so the application runs reliably from one computer to another. Background information on docker and software containers can be found [here](https://foss.cyverse.org/07_reproducibility_II/). + +To run a docker container on your local machine, you do need to install `docker`. You can install and run docker as a command line only tool for [linux distributions](https://docs.docker.com/engine/install/) or as a graphical program (i.e, Docker Desktop) for [windows](https://docs.docker.com/desktop/setup/install/windows-install/), [macOS](https://docs.docker.com/desktop/setup/install/mac-install/), or [linux](https://docs.docker.com/desktop/setup/install/linux/). We recommend running docker commands at the terminal. If you are using Docker Desktop, you can still write commands at the terminal while Docker Desktop is open and running. + + + + + + + +and if you want to use GPUs for processing, also install the `nvidia-container-toolkit` (instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)). If running Docker on Linux without `sudo` (as in this example), your user will need to be in the `docker` group. This can be achieved with `sudo usermod -a -G docker $USER` and then logging out and in, as explained [here](https://docs.docker.com/engine/install/linux-postinstall/). From 98324dddc21e9ce0abafe5c21648a6d204f3383a Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 09:31:55 -0700 Subject: [PATCH 02/12] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ff649d..cba6b73 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,15 @@ to switch to a conda environment with a current Metashape python package preinst ### Docker Docker, a type of software containerization, is an alternative way to run software where you don't need to install software in the traditional sense. Docker packages up the code and all its environment dependencies so the application runs reliably from one computer to another. Background information on docker and software containers can be found [here](https://foss.cyverse.org/07_reproducibility_II/). -To run a docker container on your local machine, you do need to install `docker`. You can install and run docker as a command line only tool for [linux distributions](https://docs.docker.com/engine/install/) or as a graphical program (i.e, Docker Desktop) for [windows](https://docs.docker.com/desktop/setup/install/windows-install/), [macOS](https://docs.docker.com/desktop/setup/install/mac-install/), or [linux](https://docs.docker.com/desktop/setup/install/linux/). We recommend running docker commands at the terminal. If you are using Docker Desktop, you can still write commands at the terminal while Docker Desktop is open and running. +To run a docker container on your local machine, you do need to install `docker`. You can install and run docker as a command line tool for [linux distributions](https://docs.docker.com/engine/install/) or as a graphical program (i.e, Docker Desktop) for [windows](https://docs.docker.com/desktop/setup/install/windows-install/), [macOS](https://docs.docker.com/desktop/setup/install/mac-install/), or [linux](https://docs.docker.com/desktop/setup/install/linux/). We recommend running docker commands at the terminal. If you are using Docker Desktop, you can still write commands at the terminal while Docker Desktop is open and running. +The `automate-metashape` docker image contains the python libraries needed to run the script, while you (the user) need to provide at minimum the **1.** aerial images; **2** a configuration file specifying your choices for processing; and optionally **3** ground control points (GCPs). +#### Image Directory +On your local machine please create a directory that includes all of the aerial images (e.g., `/home/aerial_images`). +#### Config File +Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as the begin with "/data/". From bfb033b87e76963e6a8aef6b2a8f4fbca666a479 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 09:48:26 -0700 Subject: [PATCH 03/12] Update README.md --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cba6b73..e600a49 100644 --- a/README.md +++ b/README.md @@ -25,15 +25,23 @@ Docker, a type of software containerization, is an alternative way to run softwa To run a docker container on your local machine, you do need to install `docker`. You can install and run docker as a command line tool for [linux distributions](https://docs.docker.com/engine/install/) or as a graphical program (i.e, Docker Desktop) for [windows](https://docs.docker.com/desktop/setup/install/windows-install/), [macOS](https://docs.docker.com/desktop/setup/install/mac-install/), or [linux](https://docs.docker.com/desktop/setup/install/linux/). We recommend running docker commands at the terminal. If you are using Docker Desktop, you can still write commands at the terminal while Docker Desktop is open and running. -The `automate-metashape` docker image contains the python libraries needed to run the script, while you (the user) need to provide at minimum the **1.** aerial images; **2** a configuration file specifying your choices for processing; and optionally **3** ground control points (GCPs). +The `automate-metashape` docker image contains the python libraries needed to run the script, while you (the user) need to provide at minimum the **1.** aerial images; **2** a configuration file specifying your choices for processing; **3.** a license to use Metashape; and optionally **4.** [ground control points (GCPs)](https://github.com/jeffgillan/automate-metashape/tree/main?tab=readme-ov-file#preparing-ground-control-points-gcps). #### Image Directory On your local machine please create a directory that includes all of the aerial images (e.g., `/home/aerial_images`). -#### Config File -Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as the begin with "/data/". +#### Configuration File +Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as they begin with "/data/". +#### Metashape license +Users need to provide a license to use Metashape. Currently, this docker method only supports a floating license server using the format `:`. Within a terminal, users can declare the floating license as an environmental variable using the command: +`export AGISOFT_FLS=:` + + +#### Run the Docker Container + +`docker run -v :/data -e AGISOFT_FLS=$AGISOFT_FLS --gpus all ghcr.io/open-forest-observatory/automate-metashape` and if you want to use GPUs for processing, also install the `nvidia-container-toolkit` (instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)). From 84a1e493e1697cb3319893dd0401151d68fa3ec0 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 09:57:33 -0700 Subject: [PATCH 04/12] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index e600a49..3b14c01 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ Users need to provide a license to use Metashape. Currently, this docker method `export AGISOFT_FLS=:` +#### Enable GPUs for Accelerated Processing + +The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need to extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users #### Run the Docker Container From 542433f8cb4e56ac790fa13fceca7bef0d2023cf Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 09:58:45 -0700 Subject: [PATCH 05/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3b14c01..a320268 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ Users need to provide a license to use Metashape. Currently, this docker method `export AGISOFT_FLS=:` +Keep in mind that environmental variables will not persist across different terminal sessions. + #### Enable GPUs for Accelerated Processing The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need to extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users From 6e66960cb4c14d8514c6b9beff82c34b57e066aa Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 12:36:46 -0700 Subject: [PATCH 06/12] Update README.md --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a320268..4fd72f0 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ To run a docker container on your local machine, you do need to install `docker` The `automate-metashape` docker image contains the python libraries needed to run the script, while you (the user) need to provide at minimum the **1.** aerial images; **2** a configuration file specifying your choices for processing; **3.** a license to use Metashape; and optionally **4.** [ground control points (GCPs)](https://github.com/jeffgillan/automate-metashape/tree/main?tab=readme-ov-file#preparing-ground-control-points-gcps). #### Image Directory -On your local machine please create a directory that includes all of the aerial images (e.g., `/home/aerial_images`). +On your local machine please create a directory that includes all of the aerial images (e.g., `/home/aerial_images`). This directory can be called anything you want and be located anywhere on your computer. #### Configuration File Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as they begin with "/data/". @@ -42,14 +42,24 @@ Keep in mind that environmental variables will not persist across different term #### Enable GPUs for Accelerated Processing -The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need to extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users +The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users please see [this documentation](https://docs.docker.com/desktop/features/gpu/). For macOS user, it may not be possible to use your local GPU (Apple Silicon) through Docker. #### Run the Docker Container +From a terminal, run this command: `docker run -v :/data -e AGISOFT_FLS=$AGISOFT_FLS --gpus all ghcr.io/open-forest-observatory/automate-metashape` +Here is a breakdown of the command: + +`docker run` is the command to run a docker image + +`-v :/data` is mounting a volume from your local computer into the container. We are mounting your directory that has the imagery and config file () into the container at the path "/data". + +`-e AGISOFT_FLS=$AGISOFT_FLS` is declaring your floating license to use Metashape. We set the license info as an environmental variable earlier in these instructions (i.e., `export AGISOFT_FLS=:`) + +--gpus + -and if you want to use GPUs for processing, also install the `nvidia-container-toolkit` (instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)). If running Docker on Linux without `sudo` (as in this example), your user will need to be in the `docker` group. This can be achieved with `sudo usermod -a -G docker $USER` and then logging out and in, as explained [here](https://docs.docker.com/engine/install/linux-postinstall/). From ae284e7dcdb42ecb7e049507d63ab1e7662b217f Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 12:47:21 -0700 Subject: [PATCH 07/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fd72f0..f56afa8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ For internal users working on a JS2 VM created using the OFO Dev CACAO template, to switch to a conda environment with a current Metashape python package preinstalled and configured. -### Docker +## Docker Docker, a type of software containerization, is an alternative way to run software where you don't need to install software in the traditional sense. Docker packages up the code and all its environment dependencies so the application runs reliably from one computer to another. Background information on docker and software containers can be found [here](https://foss.cyverse.org/07_reproducibility_II/). To run a docker container on your local machine, you do need to install `docker`. You can install and run docker as a command line tool for [linux distributions](https://docs.docker.com/engine/install/) or as a graphical program (i.e, Docker Desktop) for [windows](https://docs.docker.com/desktop/setup/install/windows-install/), [macOS](https://docs.docker.com/desktop/setup/install/mac-install/), or [linux](https://docs.docker.com/desktop/setup/install/linux/). We recommend running docker commands at the terminal. If you are using Docker Desktop, you can still write commands at the terminal while Docker Desktop is open and running. From 3695a8c4cd770b98679ddfb5a2daad9bac431ae5 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 13:03:39 -0700 Subject: [PATCH 08/12] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f56afa8..b6d66a4 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,9 @@ Here is a breakdown of the command: `-e AGISOFT_FLS=$AGISOFT_FLS` is declaring your floating license to use Metashape. We set the license info as an environmental variable earlier in these instructions (i.e., `export AGISOFT_FLS=:`) ---gpus +`--gpus all` If the container has access to your local GPUs, use this flag to enable it. + +`ghcr.io/open-forest-observatory/automate-metashape` This is the docker image that has the software to run the `automate-metashape` script. It is located in the Github container registry. When you execute the `docker run...` command, it will download the container image to your local machine and start the script to process imagery using Metashape. From e409a09257b6bba9a6a703e52d8cbc05af726151 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 13:22:04 -0700 Subject: [PATCH 09/12] Update README.md --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index b6d66a4..0e75b94 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,14 @@ The `automate-metashape` docker image contains the python libraries needed to ru #### Image Directory On your local machine please create a directory that includes all of the aerial images (e.g., `/home/aerial_images`). This directory can be called anything you want and be located anywhere on your computer. +**????The input data, config file, and output data can each be any number of levels below the data directory (meaning you do not need a separate data directory for each project to be run).????** + + #### Configuration File -Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as they begin with "/data/". +Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Within this config file, all paths will be relative to the file structure of the docker container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as they begin with "/data/". + +By default, the container expects the config YAML file describing the Metashape workflow parameters to be located at `/data/config.yaml`, but this can be overridden by passing a different location as a final (optional) command line argument to the `docker run` command. This would be useful if you have multiple imagery datasets/projects (and config files) nested below your mounted `/data` directory and/or if you are taking advantage of the `automate-metashape` feature to name output files based on the name of the config file. + #### Metashape license Users need to provide a license to use Metashape. Currently, this docker method only supports a floating license server using the format `:`. Within a terminal, users can declare the floating license as an environmental variable using the command: @@ -40,6 +46,7 @@ Users need to provide a license to use Metashape. Currently, this docker method Keep in mind that environmental variables will not persist across different terminal sessions. + #### Enable GPUs for Accelerated Processing The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users please see [this documentation](https://docs.docker.com/desktop/features/gpu/). For macOS user, it may not be possible to use your local GPU (Apple Silicon) through Docker. @@ -61,27 +68,20 @@ Here is a breakdown of the command: `ghcr.io/open-forest-observatory/automate-metashape` This is the docker image that has the software to run the `automate-metashape` script. It is located in the Github container registry. When you execute the `docker run...` command, it will download the container image to your local machine and start the script to process imagery using Metashape. +**???How do I change the location of config.yml or run multiple configs???** +#### Outputs +When the script is done running, the completed imagery products will be deposited within the same directory on your local machine that contains the images and config file (e.g., '/home/aerial_images'). -If running Docker on Linux without `sudo` (as in this example), your user will need to be in the `docker` group. This can be achieved with `sudo usermod -a -G docker $USER` and then logging out and in, as explained [here](https://docs.docker.com/engine/install/linux-postinstall/). - -A docker image is available from the github container registry. It can be pulled with the following command. -``` -docker pull ghcr.io/open-forest-observatory/automate-metashape:latest -``` +
+
+
-To use the docker container, you must have a directory which contains your input data and a config file, and will have output data written to it. The input data, config file, and output data can each be any number of levels below the data directory (meaning you do not need a separate data directory for each project to be run). This folder will be mounted inside the container as the `/data` folder. When creating this config file, all paths will be relative to the file structure of the docker container. So any paths to your data folder should be replaced with `/data`. The `-v :` flag mounts a folder from the host machine into the container. -By default, the container expects the config YAML file describing the Metashape workflow parameters to be located at `/data/config.yaml`, but this can be overridden by passing a different location as a final (optional) command line argument to the `docker run` command. This would be useful if you have multiple imagery datasets/projects (and config files) nested below your mounted `/data` directory and/or if you are taking advantage of the `automate-metashape` feature to name output files based on the name of the config file. +If running Docker on Linux without `sudo` (as in this example), your user will need to be in the `docker` group. This can be achieved with `sudo usermod -a -G docker $USER` and then logging out and in, as explained [here](https://docs.docker.com/engine/install/linux-postinstall/). -Metashape requires a license to run. Currently, this container only supports using a floating license server, which is specified as an `:`. Internal users can find the credentials [here](https://docs.google.com/document/d/155AP0P3jkVa-yT53a-QLp7vBAfjRa78gdST1Dfb4fls/edit?usp=sharing). On your host machine, set the `AGISOFT_FLS=:` and then set the same environment variable in the container using `-e AGISOFT_FLS=$AGISOFT_FLS`. -Finally, Metashape is accelerated by using GPUs. If your platform has GPUs and you've installed `nvidia-container-toolkit` you can make GPUs available within the container using `--gpus all`. -The following command puts it all together. This runs `automate_metashape` on the config file named `config.yml` within the mounted `/data` directory and writes the results back out to the same folder -``` -docker run -v :/data -e AGISOFT_FLS=$AGISOFT_FLS --gpus all ghcr.io/open-forest-observatory/automate-metashape -``` Note that the owner of the output data will be the `root` user. To set the ownership to your user account, you can run `sudo chown : ` or `sudo chown : -R `. You can run a different config by adding `` to the end of the command above. This can be helpful if you have multiple configs you would like to try. Note that this path is local to the container, so it will begin with `/data/` if you follow the previous configuration steps. From b80df3ad04f8ed952e179a3ff29acb3739fbfcb1 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 13:24:10 -0700 Subject: [PATCH 10/12] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0e75b94..85618e9 100644 --- a/README.md +++ b/README.md @@ -77,14 +77,13 @@ When the script is done running, the completed imagery products will be deposite

+#### Permissions on Linux If running Docker on Linux without `sudo` (as in this example), your user will need to be in the `docker` group. This can be achieved with `sudo usermod -a -G docker $USER` and then logging out and in, as explained [here](https://docs.docker.com/engine/install/linux-postinstall/). - - Note that the owner of the output data will be the `root` user. To set the ownership to your user account, you can run `sudo chown : ` or `sudo chown : -R `. -You can run a different config by adding `` to the end of the command above. This can be helpful if you have multiple configs you would like to try. Note that this path is local to the container, so it will begin with `/data/` if you follow the previous configuration steps. + ## Usage From 7bd7d617385a94b8d232f2ec29bfc25fc6957f5d Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 13:25:37 -0700 Subject: [PATCH 11/12] Update README.md --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85618e9..1b02c22 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,23 @@ To run a docker container on your local machine, you do need to install `docker` The `automate-metashape` docker image contains the python libraries needed to run the script, while you (the user) need to provide at minimum the **1.** aerial images; **2** a configuration file specifying your choices for processing; **3.** a license to use Metashape; and optionally **4.** [ground control points (GCPs)](https://github.com/jeffgillan/automate-metashape/tree/main?tab=readme-ov-file#preparing-ground-control-points-gcps). +
+ #### Image Directory On your local machine please create a directory that includes all of the aerial images (e.g., `/home/aerial_images`). This directory can be called anything you want and be located anywhere on your computer. **????The input data, config file, and output data can each be any number of levels below the data directory (meaning you do not need a separate data directory for each project to be run).????** +
+
#### Configuration File Please include the configuration file within the same directory as the images. An example configuration file is provided in this repository at `config/config-example.yml`. Please download this file to your local machine and rename it `config.yml`. Within the `config.yml` you will need to edit some of the project level parameters to specify where to find input images and where to put output products within the container. Within this config file, all paths will be relative to the file structure of the docker container. Please edit the `photo_path` to read "/data", the `output_path` to read "/data/output", and the `project_path` to read "/data/project". You have flexibility to change these paths as long as they begin with "/data/". By default, the container expects the config YAML file describing the Metashape workflow parameters to be located at `/data/config.yaml`, but this can be overridden by passing a different location as a final (optional) command line argument to the `docker run` command. This would be useful if you have multiple imagery datasets/projects (and config files) nested below your mounted `/data` directory and/or if you are taking advantage of the `automate-metashape` feature to name output files based on the name of the config file. +
+
#### Metashape license Users need to provide a license to use Metashape. Currently, this docker method only supports a floating license server using the format `:`. Within a terminal, users can declare the floating license as an environmental variable using the command: @@ -46,11 +52,16 @@ Users need to provide a license to use Metashape. Currently, this docker method Keep in mind that environmental variables will not persist across different terminal sessions. +
+
#### Enable GPUs for Accelerated Processing The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users please see [this documentation](https://docs.docker.com/desktop/features/gpu/). For macOS user, it may not be possible to use your local GPU (Apple Silicon) through Docker. +
+
+ #### Run the Docker Container From a terminal, run this command: @@ -75,7 +86,7 @@ When the script is done running, the completed imagery products will be deposite

-
+ #### Permissions on Linux From 705a3ec7db884d2c7cd4ca450fafea0a565c3398 Mon Sep 17 00:00:00 2001 From: Jeffrey K Gillan Date: Tue, 21 Jan 2025 13:28:12 -0700 Subject: [PATCH 12/12] Update README.md --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1b02c22..80968e0 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ On your local machine please create a directory that includes all of the aerial **????The input data, config file, and output data can each be any number of levels below the data directory (meaning you do not need a separate data directory for each project to be run).????** -

#### Configuration File @@ -42,7 +41,6 @@ Please include the configuration file within the same directory as the images. A By default, the container expects the config YAML file describing the Metashape workflow parameters to be located at `/data/config.yaml`, but this can be overridden by passing a different location as a final (optional) command line argument to the `docker run` command. This would be useful if you have multiple imagery datasets/projects (and config files) nested below your mounted `/data` directory and/or if you are taking advantage of the `automate-metashape` feature to name output files based on the name of the config file. -

#### Metashape license @@ -52,14 +50,12 @@ Users need to provide a license to use Metashape. Currently, this docker method Keep in mind that environmental variables will not persist across different terminal sessions. -

#### Enable GPUs for Accelerated Processing The use of graphical processing units (GPUs) can greatly increase the speed of photogrammetry processing. If your machine has GPU hardware, you will need extra software so docker can find and use your GPUs. For linux users please see [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). For Windows users please see [this documentation](https://docs.docker.com/desktop/features/gpu/). For macOS user, it may not be possible to use your local GPU (Apple Silicon) through Docker. -

#### Run the Docker Container @@ -81,12 +77,12 @@ Here is a breakdown of the command: **???How do I change the location of config.yml or run multiple configs???** +
+ #### Outputs When the script is done running, the completed imagery products will be deposited within the same directory on your local machine that contains the images and config file (e.g., '/home/aerial_images').
-
- #### Permissions on Linux @@ -94,7 +90,8 @@ If running Docker on Linux without `sudo` (as in this example), your user will n Note that the owner of the output data will be the `root` user. To set the ownership to your user account, you can run `sudo chown : ` or `sudo chown : -R `. - +
+
## Usage