From caff8e8fbdc913eb3e5af3816b8ddb57b59f992e Mon Sep 17 00:00:00 2001 From: grossti74853 <grossti74853@th-nuernberg.de> Date: Sun, 19 Mar 2023 08:30:41 +0000 Subject: [PATCH] Add instructions for server deployment --- scripts/ingest/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/scripts/ingest/README.md b/scripts/ingest/README.md index 329c0cb..c02af41 100644 --- a/scripts/ingest/README.md +++ b/scripts/ingest/README.md @@ -294,3 +294,35 @@ Imports the audio embeddings which are generated by the orca-spot model. ### Usage example `./import_audio_embeddings.py localhost:9200 ~/orchive3/general/deployment/files/audio_embedding_data` + + +## Server Deployment +The following commands can be used to deploy the Orchive on a server environment: + +1. Find the ip address of the docker network. +>`docker network ls`<br /> +Your are looking for a network with the name deployment_default<br /> +`docker network inspect "id of deployment_default"`<br /> +Here you need the ip address of the database e.g. 172.23.0.3<br /> + +2. Create the indices +>`docker exec -it deployment-scripts-1 python ./scripts/ingest/create_indices.py "ip-address of database":9200`<br /> +e.g. docker exec -it deployment-scripts-1 python ./scripts/ingest/create_indices.py 172.23.0.3:9200<br /> + +3. Import the audio tapes +>`docker exec -it deployment-scripts-1 python ./scripts/ingest/import_audio_tapes.py "ip-address of database":9200 ./tapes ./artifacts/channel_classification.json`<br /> + +4. Import the lab books +>`docker exec -it deployment-scripts-1 python ./scripts/ingest/import_lab_books.py "ip-address of database":9200 ./raw/labbooks`<br /> + +5. Import the knn lables (This might take a long time) +>`docker exec -it deployment-scripts-1 python ./scripts/ingest/import_knn_labels.py "ip-address of database":9200 ./artifacts/knn_all_out_unique_available_01-11-2022_13-07-28.txt`<br /> + +6. Import the audio segments (This might take a long time) +>`docker exec -it deployment-scripts-1 python ./scripts/ingest/import_audio_segments_by_n-call-file.py "ip-address of database":9200 ./artifacts/knn_all_out_unique_available_01-11-2022_13-07-28.txt`<br /> + +7. Import the audio embeddings (This might take a long time) +>`docker exec -it deployment-scripts-1 python ./scripts/ingest/import_audio_embeddings.py "ip-address of database":9200 ./audio_embedding_data`<br /> +Make sure, that the file structure at the mounted directory (/nfs/scratch/orchive/data/files/audio_embedding_data/browser/tape_embeddings) is in the following structure: year/latent/latent_*.p<br /> +e.g. 1985/latent/latent_001B_right.p<br /> + -- GitLab