-
Notifications
You must be signed in to change notification settings - Fork 22
Recompile requirements file used by Python in a container environment
Using Python requirements files is among Python development best practices. It dramatically reduces the need for managing and supervising different libraries. Managing your library dependencies from one place makes it easier, more convenient, and faster. It helps keep everything organized and easy for everyone involved.
It is a great way to ensure you have all the necessary dependencies installed for your project.
Also, GitHub provides automated vulnerability alerts for dependencies in your repository. By uploading a requirements.txt with your code, GitHub checks for any conflict and sends an alert to the administrator if it detects any. It can even resolve the vulnerabilities automatically!
If the conflicts in the requirements file could not be resolved automatically, or the base image version needs to be upgraded to a later version, or set to a different version, then the Python package requirements list can be recompiled by following the steps below.
Clone repository to your favourite directory on your test system.
# git clone https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana.git bridge_8.0.4-dev
Build the image for the desired version of the UBI base image by setting the --build-arg=BASE parameter. In addition, set the build argument BUILD_ENV to "test" to run pip-compile from requirements_ubi.in file. Dependencies in Python packages will be recompiled, built and tested during the image build.
# podman build --format=docker \
--build-arg=BASE=registry.access.redhat.com/ubi9/ubi:9.5-1741850090 \
--build-arg=BUILD_ENV=test -t bridge_compile:test .
Verify the build process finished successfully. Copy "Compiled python packages:" section from the CLI output to a new requirements_ubiXXX.txt file. Store the file under /requirements. Make sure the python packages install step in the Dockefile points to the new requirements file.
Build image with new ubi requirements file
# podman build --format=docker \
--build-arg=BASE=registry.access.redhat.com/ubi9/ubi:9.5-1741850090 \
-t bridge_from_ubi:8.0.4_dev .
Visit the IBM Storage Scale Knowledge Center for getting more info about the latest product updates
-
- Setup classic Grafana
- Make usage of Grafana Provisioning feature
-
- Installing RedHat community-powered Grafana operator from OperatorHub
- Creating Grafana instance using the RedHat community-powered Grafana-operator
- Creating Grafana Datasorce instance from Custom Resource managed by the RedHat community powered Grafana operator
- Importing the predefined dashboard from the example dashboards collection
- Exploring Grafana WEB interface for CNSA project in a k8s OCP environment
- How to setup Grafana instance to monitor multiple IBM Storage Scale clusters running in a cloud or mixed environment
- API key authentication
- Configurable bridge settings
- CherryPy builtin HTTP server settings
- How to setup HTTPS(SSL) connection
- Start and stop grafana-bridge with systemd
- Refresh IBM Storage Scale cluster configuration data cached by grafana bridge
- Accelerate the PrometheusExporter data retrieval time
- Grafana Dashboard Panel shows no metric values for a particular entity
- Missing Grafana-Operator on an OpenShift cluster
- Missing CherryPy packages
- What to do if your system is on Python < 3.8
- Grafana-bridge fails to start with Python3.8
- Grafana-bridge container time is different from a host time
- Verify that the grafana-bridge returns data as expected