Skip to content

Instantly share code, notes, and snippets.

@adlf-qarnot
Last active January 29, 2024 23:15
Show Gist options
  • Save adlf-qarnot/c0701e4b5251512b3ec21513f74b9b1c to your computer and use it in GitHub Desktop.
Save adlf-qarnot/c0701e4b5251512b3ec21513f74b9b1c to your computer and use it in GitHub Desktop.
Meshroom on qarnot sample
#!/usr/bin/env python3
# Import the Qarnot SDK
import qarnot
# Create a connection, from which all other objects will be derived
# Enter client token here
conn = qarnot.connection.Connection(client_token="<<<MY_SECRET_TOKEN>>>")
# Create the task
task = conn.create_task("Hello World - Meshroom", "meshroom", 1)
# Create the input bucket and synchronize with a local folder
# Insert a local folder directory
input_bucket = conn.retrieve_or_create_bucket("meshroom-in")
input_bucket.sync_directory("CuteB3")
# Attach the bucket to the task
task.resources.append(input_bucket)
# Create a result bucket and attach it to the task
task.results = conn.retrieve_or_create_bucket("meshroom-out")
# Specify the task's parameters
task.constants["INPUT_FOLDER"] = ""
task.constants["OUTPUT_FOLDER"] = "output-folder"
task.constants["LOGS_FOLDER"] = "logs"
# task.constants["DOCKER_TAG"] = "2021.1.0"
# task.constants['MESHROOM_EXTRA_FLAGS'] = ""
# Submit the task
task.run(output_dir="output")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment