--- sidebar_label: "Prolog-Hello-World" sidebar_position: 10 --- %%bash sudo add-apt-repository ppa:swi-prolog/stable sudo apt-get update sudo apt-get install swi-prolog %%writefile helloworld.pl hello_world :- write('Hello World'), nl, halt. %%bash swipl -q -s helloworld.pl -g hello_world !wget https://dist.ipfs.io/go-ipfs/v0.4.2/go-ipfs_v0.4.2_linux-amd64.tar.gz !tar xvfz go-ipfs_v0.4.2_linux-amd64.tar.gz !mv go-ipfs/ipfs /usr/local/bin/ipfs !ipfs init !ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme !ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8082 !ipfs config Addresses.API /ip4/127.0.0.1/tcp/5002 !nohup ipfs daemon > startup.log & !ipfs add helloworld.pl !curl -sL https://get.bacalhau.org/install.sh | bash %%bash --out job_id bacalhau docker run \ -v QmYq9ipYf3vsj7iLv5C67BXZcpLHxZbvFAJbtj7aKN5qii:/helloworld.pl \ --wait \ --id-only \ swipl \ -- swipl -q -s helloworld.pl -g hello_world %env JOB_ID={job_id} %%bash bacalhau list --id-filter ${JOB_ID} --wide %%bash bacalhau describe ${JOB_ID} %%bash rm -rf results && mkdir -p results bacalhau get $JOB_ID --output-dir results %%bash cat results/combined_results/stdout