Comments (3)
the dependencies for flux-accounting need to be linked in order for the subcommands to work. My hack was to run pip3 install -r requirements.txt --user again, but maybe there is another way to do this in the Dockerfile while the image is being built?
Okay, I think I was able to solve the No module named 'pandas'
error by installing the dependencies to /usr/local/lib64/python3.6/site-packages/
instead of --user
, which I think was installing them to root/.local/
.
Old pip3
command in Dockerfile:
$ pip3 install -r requirements.txt --user
New pip3
command in Dockerfile:
$ pip3 install -r requirements.txt -t /usr/local/lib64/python3.6/site-packages/
from flux-accounting.
Here is the final Dockerfile
that I sent out to the stakeholders to interact with:
FROM grondo/fluxorama:latest
LABEL maintainer="Christopher Moussa <[email protected]>"
COPY . /usr/lib64/flux-accounting/
RUN yum -y update \
&& yum install -y python3-pip python3-devel git \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --user --upgrade pip \
&& pip3 install tox
# go into flux-accounting, install dependencies, and run unit tests
RUN cd /usr/lib64/flux-accounting/ \
&& pip3 install -r requirements.txt -t /usr/local/lib64/python3.6/site-packages/ \
&& make install \
&& make check
# load job-archive module
RUN printf "#!/bin/bash\nflux module load job-archive dbpath=/var/lib/flux/jobs.db\n" \
>/etc/flux/rc1.d/job-archive \
&& chmod +x /etc/flux/rc1.d/job-archive
# make directory for flux-accounting database
RUN mkdir /var/lib/flux-ba
# create flux-accounting database where fluxuser is the "admin"
RUN cd /usr/lib64/flux-accounting/accounting/ \
&& ./create_db.py -p /var/lib/flux-ba/FluxAccounting.db \
&& chown -R fluxuser /var/lib/flux-ba/
# load job-archive module
RUN printf "#!/bin/bash\nflux module load job-archive dbpath=/var/lib/flux/jobs.db\n" \
>/etc/flux/rc1.d/job-archive \
&& chmod +x /etc/flux/rc1.d/job-archive
This loads the job-archive
module and create a database to store inactive jobs. When they are placed here, the database is preserved across restarts and can be accessed with SQLite queries. Flux will not launch successfully if the job-archive
module is not executable.
Inside of /var/lib/
, a new directory gets created called flux-ba
that will hold the flux-accounting database. This database is also preserved across restarts, and can also be accessed with SQLite queries as well as with the flux account
subcommands.
I think the caveat for read/write access to the SQLite databases is the same permissions should also be reflected in the directory the database file is located in, i.e. the user must also have permissions to the directory the .db file is in [1], so that's something I would need to look out for.
from flux-accounting.
I am going to close this issue since I have a working Dockerfile to create an interactive Docker container with flux-accounting
and the job-archive DB installed.
from flux-accounting.
Related Issues (20)
- testsuite: fix tests that look at job state HOT 1
- support bank and project updates HOT 1
- `view-bank`: `-t` option does show hierarchy for a sub bank with users in it
- per-queue user limits HOT 2
- plugin: create external `bank_info` class HOT 1
- all pending jobs killed after Flux update HOT 5
- plugin: create new `Association` class
- plugin: improve callback for `job.validate` HOT 1
- error in flux account view-job-records HOT 2
- `plugin.query`: abstract helper functions that create JSON objects of flux-accounting data HOT 1
- `job.new`: use new external functions for user/bank lookups
- plugin: support bypassing limits
- `job.update`/`job.update...queue`: use new external methods for association lookup
- `job.state.priority`: use new external function for association lookup, general function improvement
- plugin: move accounting-specific helper functions to `accounting.cpp`
- plugin: send max nodes information per-association
- plugin: create estimation of node count helper function
- docs: move flux-accounting guide to this repo HOT 1
- create script for crontab tasks HOT 3
- flux account commands hang while fairshare is being updated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flux-accounting.