Skip to content

Installing OS level packages

With UbiOps it is possible to install OS level packages in the environment of a deployment, by adding a ubiops.yaml to the root of your deployment package. In the yaml file you can specify the packages you need to install with APT. For instance, to be able to use the Python package Caffe in your deployment, the following ubiops.yaml could be used:

apt:
  packages:
    - caffe-cpu
    - ffmpeg
    - libsm6
    - libxext6

To install external packages that cannot be installed with apt-get, add the keys and sources parameters to the ubiops.yaml and point to the correct urls. Below you can see another example ubiops.yaml that showcases how to use additional parameters.

environment_variables:
- ACCEPT_EULA=Y
apt:
  keys:
    urls:
      - https://packages.microsoft.com/keys/microsoft.asc
  sources:
    urls:
      - https://packages.microsoft.com/config/ubuntu/20.04/prod.list
    items:
      - deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main
  packages:
    - python3-dev
    - build-essential
    - libmysqlclient-dev
    - mssql-tools
    - msodbcsql17
    - unixodbc-dev

Place the ubiops.yaml in your deployment package on the same level as the deployment file. UbiOps will install the packages when building your deployment.