can you run
LD_LIBRARY_PATH="$(python3 -m site --user-site)/pyxrootd/lib/" python3 -c "import XRootD.client"and report back whether it raises an
ImportError
?
@adriansev @agoose77 Yeah, this
export LD_LIBRARY_PATH="$(python3 -m site --user-site)/pyxrootd/lib:${LD_LIBRARY_PATH}"
works. In a Dockerfile you need to manually set this though as ENV
can't be set by runtime variables, so here's that in ubuntu:20.04
ARG BASE_IMAGE=ubuntu:20.04
FROM ${BASE_IMAGE} as base
SHELL [ "/bin/bash", "-c" ]
ENV PATH=/usr/local/venv/bin:"${PATH}"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ \
git \
cmake \
uuid-dev \
dpkg-dev \
libssl-dev \
libx11-dev \
libxml2-dev \
libkrb5-dev \
libgsl0-dev \
pkg-config \
python3 \
python3-pip \
python3-venv \
python3-dev && \
apt-get autoclean -y && \
python3 -m pip --no-cache-dir install --upgrade pip setuptools wheel && \
python3 -m pip list
WORKDIR /
# export LD_LIBRARY_PATH="$(python3 -m site --user-site)/pyxrootd/lib:${LD_LIBRARY_PATH}"
ENV LD_LIBRARY_PATH="/root/.local/lib/python3.8/site-packages/pyxrootd/lib:${LD_LIBRARY_PATH}"
# Show --user even though I don't recommend it just to show it works
RUN python3 -m pip --no-cache-dir install --user --upgrade pip setuptools wheel && \
python3 -m pip install --user --verbose 'xrootd==5.4.2' && \
python3 -m pip list
RUN python3 -m pip list && \
python3 -m pip show xrootd && \
python3 -c 'import XRootD; print(XRootD)' && \
python3 -c 'import pyxrootd; print(pyxrootd)' && \
python3 -c 'from XRootD import client; print(client.FileSystem("root://someserver:1094"))'
CMD ["/bin/bash"]
docker build . -f Dockerfile -t xrootd/xrootd:issue-1668
$ docker run --rm -ti xrootd/xrootd:issue-1668
root@e63fb03decdb:/# python3 -m pip list
Package Version
---------- -------
pip 22.0.4
setuptools 60.9.3
wheel 0.37.1
xrootd 5.4.2
root@e63fb03decdb:/# python3 -m pip show xrootd
Name: xrootd
Version: 5.4.2
Summary: XRootD Python bindings
Home-page: http://xrootd.org
Author: XRootD Developers
Author-email: [log in to unmask]
License: LGPLv3+
Location: /root/.local/lib/python3.8/site-packages/xrootd-5.4.2-py3.8-linux-x86_64.egg
Requires:
Required-by:
root@e63fb03decdb:/# python3 -c 'from XRootD import client; print(client.FileSystem("root://someserver:1094"))'
<XRootD.client.filesystem.FileSystem object at 0x7fc3038794c0>
root@e63fb03decdb:/#
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1