Graphviz in custom environments

The predefined environments include the graphviz Python package, which works because the required Graphviz binaries are installed.

However, when I create a custom environment and install the same graphviz package, it doesn’t work, the binaries aren’t found. It seems that a custom environment isn’t just a new Python environment on the same machine, but more like a fresh container with no extras.

This older thread asks a similar question, but I believe it’s outdated. It predates the custom environment feature and maybe even the inclusion of Graphviz in the standard environments.

So my question is: what’s the correct way to get Graphviz (with working binaries) in a custom environment?

1 Like

I’ve read that there are WebAssembly versions of graphviz, but have no experience with them. These would run in the browser, so no server-side binaries required.

1 Like

That could be an option, but I need it to run on the server, after scanning thousands of DB rows.

I could do the scan, send a short list of dictionaries to the client, but it would be nicer to have it working on the server.

Hi @stefano.menci!

If you click on “Advanced settings…” under where you can install custom packages, you’ll see where you can add a pre-install bash script.

I realized that this is an undocumented feature, so I’ve raised an issue to have that added to the docs!

3 Likes

Does that mean we can install non-python packages as well through this method?

Thank you, this did the job:

image

3 Likes