Bayesian Computation Experiments
For this project/template, the remote development environment requires
An image is built via the command
docker build . --file .devcontainer/Dockerfile -t uncertainty
On success, the output of
docker images
should include
repository | tag | image id | created | size |
---|---|---|---|---|
uncertainty | latest |
Subsequently, run a container, i.e., an instance, of the image uncertainty
via:
docker run --rm --gpus all -i -t -p 127.0.0.1:10000:8888 -w /app
--mount type=bind,src="$(pwd)",target=/app uncertainty
Herein, -p 10000:8888
maps the host port 10000
to container port 8888
. Note, the container's working environment,
i.e., -w, must be inline with this project's top directory. Additionally
- --rm: automatically remove container
- -i: interact
- -t: tag
- -p: publish
Get the name of the container via:
docker ps --all
Never deploy a root container, study the production Dockerfile; cf. /.devcontainer/Dockerfile
Adding
JAX_PLATFORM_NAME=GPU
to /etc/profile
might address the verbose device info; JAX_PLATFORM_NAME
is being deprecated in favour of JAX_PLATFORMS
, in progress.
An IDE (integrated development environment) is a helpful remote development tool. The IntelliJ IDEA set up involves connecting to a machine's Docker daemon, the steps are
- Settings
$\rightarrow$ Build, Execution, Deployment$\rightarrow$ Docker$\rightarrow$ WSL: {select the linux operating system}- View
$\rightarrow$ Tool Window$\rightarrow$ Services
Within the Containers section connect to the running instance of interest, or ascertain connection to the running instance of interest.
Visual Studio Code has its container attachment instructions; study Attach Container.
The GitHub Actions script main.yml conducts code analysis within a Cloud GitHub Workspace. Depending on the script, code analysis may occur on push
to any repository branch, or on push
to a specific branch.
The sections herein outline remote code analysis.
The directive
pylint --generate-rcfile > .pylintrc
generates the dotfile .pylintrc
of the static code analyser pylint. Analyse a directory via the command
python -m pylint --rcfile .pylintrc {directory}
The .pylintrc
file of this template project has been amended to adhere to team norms, including
-
Maximum number of characters on a single line.
max-line-length=127
-
Maximum number of lines in a module.
max-module-lines=135
Test a program via
python -m pytest ...
For code & complexity analysis. A directive of the form
python -m flake8 --count --select=E9,F63,F7,F82 --show-source
--statistics src/{directory.name}
inspects issues in relation to logic (F7), syntax (Python E9, Flake F7), mathematical formulae symbols (F63), undefined variable names (F82). Additionally
python -m flake8 --count --exit-zero --max-complexity=10 --max-line-length=127
--statistics src/{directory.name}
inspects complexity.
JAX
- JAX
- Building JAX Dependent Products
- Snippets
- JAX Containers, JAX Early Access
- What Is In The Container?
XLA (Accelerated Linear Algebra)
Miscellaneous
- conda
conda search -i ....
- pip
- Python Package Index
- Anaconda Packages