metagraph icon indicating copy to clipboard operation
metagraph copied to clipboard

Docker issue: No version information available: libhts.so.3:

Open bbowles1 opened this issue 1 year ago • 4 comments

Hello! I've tried to pull two different metagraph Docker images for Metagraph using the following: docker pull ghcr.io/ratschlab/metagraph:latest docker pull ghcr.io/ratschlab/metagraph:master

In both cases, I'm able to run the Docker container with a /bin/bash entrypoint, but receive the following when I run any Metagraph commands:

metagraph: /lib/x86_64-linux-gnu/libhts.so.3: no version information available (required by metagraph)

It appears that libhts.so.3 is installed at /usr/lib/x86_64-linux-gnu/libhts.so.1.10.2-3ubuntu0.1, but I'm not sure how to go about providing the version to MetaGraph.

If it's relevant, I'm working with an Apple silicon laptop running MacOSX Sonoma 14.4.1 and Docker engine 24.0.6. Any insights you can offer are very much appreciated!

bbowles1 avatar May 29 '24 01:05 bbowles1

Hi @bbowles1! Does the issue still occur to you? I tried to do the following:

sudo docker pull ghcr.io/ratschlab/metagraph:latest
sudo docker run -it --entrypoint /bin/bash ghcr.io/ratschlab/metagraph:latest

Then, in the docler image, I have


root@825172b7a726:/# metagraph
Usage: metagraph <command> [command specific options]

Available commands:
	build		construct a graph object from input sequence
			files in fast[a|q] formats into a given graph

	clean		clean an existing graph and extract sequences from it
			in fast[a|q] formats

	transform	given a graph, transform it to other formats

	align		align sequences provided in fast[a|q] files to graph

	annotate	given a graph and a fast[a|q] file, annotate
			the respective kmers

	relax_brwt	optimize the tree structure in brwt annotator

	transform_anno	change representation of the graph annotation

	assemble	given a graph, extract sequences from it

	query		annotate sequences from fast[a|q] files

	server_query	annotate received sequences and send annotations back

	stats		print graph statistics for given graph(s) or annotation

General options:
	--advanced 	show other advanced and legacy options [off]
	--version 	print version

So, I can not reproduce the error that you describe at the moment. I tested it on Docker version 26.1.4, and then also downgraded to 24.0.6, but it didn't change anything.

adamant-pwn avatar Jun 20 '24 00:06 adamant-pwn

I met the same log, but it seems do not affect.

shenwei356 avatar Jul 06 '24 10:07 shenwei356

Hey Adamant, thanks for the quick response! I followed up on your recommendations and unfortunately I'm receiving an error "Illegal instruction" after I run the container and enter a simple metagraph command like you recommended.

This seems to be a MacOS-specific issue, as the Metagraph container works flawlessly when I run it in a Linux environment. On Mac, I see an AMD64 warning "Image may have poor performance, or fail, if run via emulation" when I pull the Docker image. Adding a --platform linux/amd64 flag to the Docker run command to explicitly run the container via emulation does not change the error or resolve my issue.

Since this appears related to MacOS, and you may be unable to replicate the error as a result, I understand if you wish to close this issue. In the meantime, I'm happy to update if I have any further insights into this error. Thanks again for your recommendations.

bbowles1 avatar Jul 07 '24 21:07 bbowles1

Checking in with a quick update, I'm also unable to build the Docker image locally. I receive an error related to a missing install.sh:

(base) bbowles@Bradleys-MBP metagraph % docker build .
[+] Building 124.0s (16/22)                                                                                                                      docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                             0.0s
 => => transferring dockerfile: 3.13kB                                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                                0.0s
 => => transferring context: 225B                                                                                                                                0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                                  1.2s
 => [internal] load build context                                                                                                                                0.1s
 => => transferring context: 38.28kB                                                                                                                             0.1s
 => CACHED [metagraph_dev_env 1/8] FROM docker.io/library/ubuntu:20.04@sha256:0b897358ff6624825fb50d20ffb605ab0eaea77ced0adb8c6a4b756513dec6fc                   0.0s
 => CACHED [stage-2 2/8] RUN apt-get update && apt-get install -y     libatomic1     libcurl4-nss-dev     libgomp1     libhts-dev     libjemalloc2     python3   0.0s
 => [metagraph_dev_env 2/8] RUN export DEBIAN_FRONTEND="noninteractive" && apt-get update && apt-get install -y     autoconf     automake     binutils-dev      89.6s
 => [metagraph_dev_env 3/8] RUN pip3 install parameterized==0.7.1 "cmake>=3.19"                                                                                  3.3s
 => [metagraph_dev_env 4/8] WORKDIR /opt                                                                                                                         0.0s 
 => [metagraph_dev_env 5/8] RUN git clone https://github.com/curl/curl.git     && mkdir curl/_build     && cd curl/_build     && cmake -DBUILD_SHARED_LIBS=on   20.9s 
 => [metagraph_dev_env 6/8] RUN wget https://github.com/samtools/htslib/releases/download/1.10.2/htslib-1.10.2.tar.bz2     && tar -vxjf htslib-1.10.2.tar.bz2    8.2s 
 => [metagraph_dev_env 7/8] RUN mkdir -p /opt/metagraph/build_docker /opt/ccache_docker                                                                          0.3s 
 => [metagraph_dev_env 8/8] RUN chmod o+rwx /opt/metagraph /opt/ccache_docker                                                                                    0.3s 
 => [metagraph_bin 1/3] COPY . /opt/metagraph                                                                                                                    0.1s 
 => [metagraph_bin 2/3] WORKDIR /opt/metagraph                                                                                                                   0.0s 
 => ERROR [metagraph_bin 3/3] RUN make build-sdsl-lite     && make build-metagraph alphabet=Protein     && make build-metagraph alphabet=DNA                     0.1s 
------                                                                                                                                                                
 > [metagraph_bin 3/3] RUN make build-sdsl-lite     && make build-metagraph alphabet=Protein     && make build-metagraph alphabet=DNA:                                
0.088 bash -c 'cd /opt/metagraph/metagraph/external-libraries/sdsl-lite && ./install.sh ${PWD}'
0.092 bash: ./install.sh: No such file or directory
0.093 make: *** [Makefile:72: build-sdsl-lite] Error 127
------
Dockerfile:80
--------------------
  79 |     WORKDIR ${CODE_BASE}
  80 | >>> RUN make build-sdsl-lite \
  81 | >>>     && make build-metagraph alphabet=Protein \
  82 | >>>     && make build-metagraph alphabet=DNA
  83 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c make build-sdsl-lite     && make build-metagraph alphabet=Protein     && make build-metagraph alphabet=DNA" did not complete successfully: exit code: 2

bbowles1 avatar Jul 08 '24 00:07 bbowles1

Hi @bbowles1, the Docker container is fixed now (the previous release where it worked for me was v0.3.6. Now the latest images (ghcr.io/ratschlab/metagraph:master) are working on MacOS again, and will be supported in the next release). All other issues mentioned in this thread should also be fixed now. Please let me know if you have any questions.

karasikov avatar Oct 02 '25 11:10 karasikov