-
Notifications
You must be signed in to change notification settings - Fork 10
flux accounting Docker virtualenv instructions
Christopher Moussa edited this page Oct 21, 2020
·
1 revision
Launch the interactive Docker container:
FLUXUSER_PASSWORD=foo docker run -e FLUXUSER_PASSWORD --tmpfs=/run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v <path/to/your/flux-accounting/dir:/usr/src: -p127.0.0.1:8000:7681 fluxrm/fluxorama
Either in a browser (localhost:8000) or docker exec -ti -u fluxuser ${container_id} bash
:
$ cd /usr/src
$ python3 -m venv local_venv
$ source local_venv/bin/activate
(local_venv) [fluxuser@7b0a61e07aa7 src]$ which python3
(local_venv) [fluxuser@7b0a61e07aa7 src]$ pip3 install -r requirements.txt
(local_venv) [fluxuser@7b0a61e07aa7 src]$ python3 setup.py develop
(local_venv) [fluxuser@7b0a61e07aa7 src]$ flux-account.py -h
usage: flux-account.py [-h] [-p PATH] [-o OUTPUT_FILE]
{view-user,add-user,delete-user,edit-user,view-job-records,create-db,add-bank,view-bank,delete-bank,edit-bank,print-hierarchy}
...
Description: Translate command line arguments into SQLite instructions for the
Flux Accounting Database.
positional arguments:
{view-user,add-user,delete-user,edit-user,view-job-records,create-db,add-bank,view-bank,delete-bank,edit-bank,print-hierarchy}
sub-command help
view-user view a user's information in the accounting database
add-user add a user to the accounting database
delete-user remove a user from the accounting database
edit-user edit a user's value
view-job-records view job records
create-db create the flux-accounting database
add-bank add a new bank
view-bank view bank information
delete-bank remove a bank
edit-bank edit a bank's allocation
print-hierarchy print accounting database
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH specify location of database file
-o OUTPUT_FILE, --output-file OUTPUT_FILE
specify location of output file