Skip to content

Installing additional operating system packages

With UbiOps it is possible to install additional software packages in the Docker image of the deployment. UbiOps uses a ubuntu:20.04 base image and therefore APT packages available for Ubuntu 20.04 can be installed.

You can do this 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.

Not available for Windows dependencies

This functionality only works for installing Linux compatible software packages.

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.