Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandamonium in docker images #47

Open
kratsg opened this issue Nov 19, 2020 · 2 comments
Open

pandamonium in docker images #47

kratsg opened this issue Nov 19, 2020 · 2 comments

Comments

@kratsg
Copy link
Contributor

kratsg commented Nov 19, 2020

I created a voms-atlas docker image which is a good base image with python3 +voms (and rucio) configuration that pandamonium could use as a base image -- see below

$ docker run -it --rm -v $HOME/.globus:/root/.globus kratsg/voms-atlas
[root@b5682171485d panda]# python3 -m pip install pandamonium
Collecting pandamonium
  Downloading pandamonium-0.2.1-py2.py3-none-any.whl (13 kB)
Collecting panda-client>=1.0
  Downloading panda-client-1.4.45.tar.gz (180 kB)
     |################################| 180 kB 3.5 MB/s 
Building wheels for collected packages: panda-client
  Building wheel for panda-client (setup.py) ... done
  Created wheel for panda-client: filename=panda_client-1.4.45-py3-none-any.whl size=134084 sha256=bbad78630a200f7ca031bcd0b6e0a8f38d920a09a1d0899edbbc84a121aec8d8
  Stored in directory: /root/.cache/pip/wheels/39/a1/15/5a4039a6d538040e8049aef2a35514f18fd1afe9391f1fedec
Successfully built panda-client
Installing collected packages: panda-client, pandamonium
Successfully installed panda-client-1.4.45 pandamonium-0.2.1
[root@b5682171485d panda]# panda
panda-kill-taskid   panda-resub-taskid  panda-shortname     pandamon            pandamonium         
[root@b5682171485d panda]# panda-kill-taskid 1231231
INFO : Need to generate a grid proxy
Enter GRID pass phrase for this identity:
PBook user: Giordon Holtsberg Stark 
Permission denied: reqID=1231231 is not owned by Giordon Holtsberg Stark 
@matthewfeickert
Copy link
Collaborator

@kratsg motivated by @alexander-held's question can you remind me what the specific files were that you had to generate for your Dockerfile and why? I know that the files are the ones here, but I don't remember the technical details from the last time you explained parts of this about why those files in particular are needed and how much vendoring or patching is needed.

That being said,

FROM kratsg/voms-atlas:latest as base

SHELL [ "/bin/bash", "-c" ]

# Set PATH to pickup virtualenv by default
ENV PATH=/usr/local/venv/bin:"${PATH}"

RUN python3 -m venv /usr/local/venv && \
    . /usr/local/venv/bin/activate && \
    python -m pip --no-cache-dir install --upgrade pip setuptools wheel && \
    python -m pip --no-cache-dir install pandamonium

ENV USER=feickert
$ docker build -f Dockerfile -t pandamonium/voms:debug-local .
$ docker run -it --rm -v $HOME/.globus:/root/.globus pandamonium/voms:debug-local 
[root@1849110c163c panda]# python -m pip show pandamonium
Name: pandamonium
Version: 0.3.0
Summary: Command line library to parse the Panda web API
Home-page: https://github.com/dguest/pandamonium
Author: Dan Guest, Matthew Feickert
Author-email: daniel.hay.guest@cern.ch, matthew.feickert@cern.ch
License: BSD 3-Clause
Location: /usr/local/venv/lib/python3.6/site-packages
Requires: panda-client
Required-by: 
[root@1849110c163c panda]# pandamon user.gstark --days 200 --more-info
done        26587981  161089    100%   0%     user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_21p2p164_v4_s1/ 
failed      26587801  161085    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_21p2p164_v3_s1/ 
failed      26587566  161081    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_21p2p164_v2_s1/ 
failed      26587326  161077    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_21p2p164_v1_s1/ 
done        26587282  161075    100%   0%     user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_refactorRebase_STConfigFix_v6_s1/ 
failed      26587256  161071    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_refactorRebase_STConfig_v5_s1/ 
failed      26587238  161067    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_refactorRebase_v4_s1/ 
failed      26587195  161063    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_refactor_v3_s1/ 
failed      26587183  161059    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_v2_s1/ 
failed      26587179  161055    0%     100%   user.gstark.USER.700338.e8351_s3126_r9364_p4060_vbfEWK_test_v1_s1/ 
[root@1849110c163c panda]#

isn't too bad at all! 🙂

@kratsg
Copy link
Contributor Author

kratsg commented Mar 18, 2022

Probably inspired by the rucio tutorials in particular (https://www.hep.lu.se/courses/grid/2019/NTF004F-lecture6.pdf) and grabbed some stuff from here (https://gitlab.cern.ch/felopez/rucio/-/tree/0.3.5/tools).

pyopenssl.py comes from https://github.com/urllib3/urllib3/blob/main/src/urllib3/contrib/pyopenssl.py (for python2 in some cases and might be droppable with a better base image). The rucio.cfg is one I built so that I could use rucio in these images as well -- which is part of the reason for adding the appropriate CA files (to add a repo to "install rucio").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants