Setting up AutoSfM
Setting up Docker
Reference: https://docs.docker.com/engine/install/ubuntu/
Run the following commands in sequence to install Docker
sudo apt-get update sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
Test the installation using the following command
sudo docker run hello-world
By default, Docker is installed as root, and needs sudo to run. To ensure that Docker can run as a non-root user, run the following commands
sudo groupadd docker sudo usermod -aG docker $USER # This command will make the changes effective newgrp docker
To test if Docker is runnable as non-root, i.e., the current user (azureuser on a default Azure VM), run:
docker run hello-world
Now, configure Docker to start up on boot
sudo systemctl enable docker.service sudo systemctl enable containerd.service
Setting up the autoSfM repository
Clone the repository (https://github.com/precision-sustainable-ag/autoSfM ) using
cd ~ git clone https://github.com/precision-sustainable-ag/autoSfM.git
Building the autoSfM Docker image
Run the following commands to build the Docker image
cd ~/autoSfM docker build -t sfm .
Upon succesful build, an image named sfm
will be created on the host. Verify that the image is built using:
docker image ls
The output should look like this:
The setup for autoSfM is complete
Setting up SemiF-Annotation Pipeline
Setting up miniconda
Minicinda is a barebones Anaconda installation, which only installs the conda (package management) functionality. This is prefereable to the full Anaconda, which installs many data science packages, and is very bulky. To install miniconda, refer to the official guide: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html . Note that the exact name of the executable will vary by the version of Miniconda used.
mkdir ~/software # Copy the Miniconda installer to software cd ~/software bash Miniconda3-py39_4.12.0-Linux-x86_64.sh
When prompted to accept the agreement, type yes
and press Enter
When prompted for the installation location, press Enter. This will keep the default path
When prompted, type yes
and press Enter
Login again and conda will be active.
Setting up SemiF-Annotation Pipeline repository
Clone the SemiF-Annotation Pipeline repository from https://github.com/precision-sustainable-ag/SemiF-AnnotationPipeline using
cd ~ git clone -b develop https://github.com/precision-sustainable-ag/SemiF-AnnotationPipeline.git
The repository and the code is now set up. Note that the -b develop
is a temporary measure till the main branch is updated with the stable changes.
Setting up the conda environment
Make a new conda environment from the environment.yml
file in the repository
# OpenCV dependencies sudo apt-get install ffmpeg libsm6 libxext6 -y cd ~/SemiF-AnnotationPipeline conda env create -f environment.yml
Copy the metashape software to autosfm/volumes/metashape
. The installation will look like this:
Setting up the blob mounts
TODO
0 Comments