FAQ and troubleshooting
Frequently asked questions
Section titled “Frequently asked questions”How can I add an external resource to my Viash component?
Section titled “How can I add an external resource to my Viash component?”You can add additional resources such as a file containing helper functions. List those files under
the resources section of your component config and refer to them in your script using
meta["resources_dir"] + "/myresource.txt". See the Viash documentation for concrete examples on
how to add helper functions and
other resources to your component.
What does __merge__ do?
Section titled “What does __merge__ do?”The __merge__ field merges another YAML file into a Viash config. One of its primary uses is
ensuring that all components in a task share the same API.
Each task in OpenProblems contains strict definitions of the input/output file interface of its
components and the file formats of those files. These interfaces are stored as YAML files in the
api subdirectory of each task. When a component config includes __merge__: ../../api/comp_method.yaml,
Viash automatically imports those argument definitions, keeping all method configs consistent with
the task’s API.
Troubleshooting
Section titled “Troubleshooting”Choosing between multiple versions of Java
Section titled “Choosing between multiple versions of Java”Your system might have multiple versions of Java installed. To check which versions are available
(usually under /usr/lib/jvm/):
ls -1 /usr/lib/jvm/java-11-openjdkjava-19-openjdkjava-19-openjdk-19.0.0.0.36-2.rolling.el8.x86_64...Add the following to your ~/.bashrc (or your execution script) to select the correct version:
export JAVA_HOME=/usr/lib/jvm/java-19-openjdkPermission error with Docker
Section titled “Permission error with Docker”If you get a permission denied error on Linux, add your user to the docker group:
sudo usermod -aG docker $USERLog out and back in again, then verify:
groupsdocker run hello-worldDocker daemon is not running
Section titled “Docker daemon is not running”If Docker commands fail with a “daemon not running” error, enable Docker to start on boot:
sudo systemctl enable dockersudo systemctl start dockerdocker run hello-worldViash: command not found
Section titled “Viash: command not found”Check whether Viash is installed in $HOME/.local/bin:
ls $HOME/.local/bin/viashIf it exists but the command is still not found, $HOME/.local/bin is likely missing from your
PATH. Check with:
echo $PATHIf /home/youruser/.local/bin is absent, look up instructions for adding a folder to your PATH
for your operating system and shell.
Nextflow: command not found
Section titled “Nextflow: command not found”Same as above — check $HOME/.local/bin/nextflow exists, then verify $HOME/.local/bin is in
your PATH.