Skip to content

Commit 9c082f9

Browse files
committed
Few minor tweaks
1 parent 00e8b4e commit 9c082f9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pages/docs/user-docs/docs-instances.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Singularity pdf_server.img:~/bauerm97/instance-example> exit
187187

188188
### Making it Pretty
189189

190-
Now that we have comfirmation that the server is working, let's make it a little cleaner. It's reallying annoying to have to remember the exact curl comand and URL syntax each time you want to request a PDF, so let's automate that. To do that, we're going to be using apps. If you haven't already, check out the [Singularity app documentation](link-to-app-docs-or-scif) to come up to speed.
190+
Now that we have comfirmation that the server is working, let's make it a little cleaner. It's difficult to remember the exact curl comand and URL syntax each time you want to request a PDF, so let's automate that. To do that, we're going to be using Standard Container Integration Format (SCIF) apps, which are integrated directly into singularity. If you haven't already, check out the [Singularity app documentation](link-to-app-docs-or-scif) to come up to speed.
191191

192192
First off, we're going to move the installation of the `url-to-pdf-api` into an app, so that there is a designated spot to place output files. To do that, we want to add a section to our definition file to build the server:
193193

@@ -207,7 +207,7 @@ Now we want to define the pdf_client app, which we will run to send the requests
207207
echo "Usage: singularity run --app pdf <instance://name> <URL> [output file]"
208208
exit 1
209209
fi
210-
curl -o "/scif/data/pdf/output/${2:-output.pdf}" "${URL}:${PORT}/api/render?url=${1}"
210+
curl -o "/scif/data/pdf_client/output/${2:-output.pdf}" "${URL}:${PORT}/api/render?url=${1}"
211211
```
212212

213213
As you can see, the `pdf_client` app checks to make sure that the user provides at least one argument. Now that we have an output directory in the container, we need to expose it to the host using a bind mount. Once we've rebuilt the container, make a new directory callout `out` for the generated PDF's to go. Now we simply start the instance like so:
@@ -222,7 +222,7 @@ And to request a pdf simply do:
222222
$ singularity run --app pdf_client instance://pdf http://google.com google.pdf
223223
```
224224

225-
And to confirm that it works:
225+
And to confirm that it worked:
226226

227227
```
228228
$ ls out/

0 commit comments

Comments
 (0)