Docker Containers¶
Baseband Analysis uses container technology to package and distribute production and developer environments. The docker images supported through this project are shown below,
Docker Image | Purpose |
---|---|
chimefrb/baseband-data | Storage for additional data products |
chimefrb/baseband-base | Base image with linux dependencies |
chimefrb/baseband-core | Analysis independent, core utilities |
chimefrb/baseband-developer | Developer test environment |
chimefrb/baseband-beamform | CHIME/FRB Beamform Analysis |
Developer Environment¶
By default, chimefrb/baseband-developer
image is installed in an editible mode with additional developer dependencies. In order to setup a developer environment follow the steps shown below,
Codebase
# Clone the base repository code git clone https://github.com/CHIMEFRB/baseband-analysis.git
Docker
# Fetch the docker docker pull chimefrb/baseband-developer:latest
```
docker run -it -v $(pwd):/baseband-analysis chimefrb/baseband-developer:latest /bin/bash
```
Environment
# Build and install baseband analysis python baseband_analysis/utilities/developer.py python setup.py develop
Testing
````# Mount golden test data into the Docker container docker run -it -v $(pwd):/baseband-analysis -v /data/pipeline-data-products/baseband-analysis/golden-test-data:/data/pipeline-data-products/baseband-analysis/golden-test-data:ro -v /data/pipeline-data-products/baseband-analysis/golden-test-data-output:/data/pipeline-data-products/baseband-analysis/golden-test-data-output chimefrb/baseband-developer:latest /bin/bash
pytest -vvv --runslow # slow tests necessary for scientific accuracy
```
```
# Run individual test
pytest baseband_analysis/tests/<filename.py>
```
Additional Configuration¶
Incase you need to install your private dependencies required by the project inside the docker container, you need to pass a secure shell identification to the docker environment,
````
docker run -it -v ~/.ssh/
```
```