Issue with !apt install Commands in JupyterLab on Nvidia AI Workbench

Hello Community,

I’m currently working within Nvidia AI Workbench, leveraging an environment that supports Python with CUDA 11.7 (w/ Podman). My setup details are as follows: AI Workbench v1.0.3, running on Ubuntu 22.04, with Python3. This environment includes support for CUDA 11.7 and offers JupyterLab alongside package managers like apt and pip.

I’ve encountered a stumbling block when attempting to use !apt install commands directly in a Jupyter notebook. Specifically, trying to execute !apt install -y poppler-utils results in permission-related errors:

  • “E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)”
  • “E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?”

It appears to be a permissions issue, but I’m puzzled about how to resolve this within the confines of the AI Workbench’s JupyterLab environment. I’m reaching out to see if anyone here has navigated this problem or possesses insights on running !apt install commands successfully in this setup.

Any advice, workarounds, or guidance would be immensely helpful. Thank you in advance for your time and assistance!


Thanks for reaching out. Try placing the apt package under the apt.txt file in your project and rebuild the environment. Workbench should automatically take care of the package installation for you to use in your environment.

Hi Martin,

Did Edward’s suggestion resolve your issue?


Please try the suggested apt.txt suggestion for loading the apt-get package, you are experience a sudo permissions problem. After saving apt.txt from your project initiate the project rebuild. From the lower right Build button in the AIWB App. And file a new issue if this is not resolved.