Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using "Extra Parameters" to install more pip packages

Featured Replies

I'm using paperless-ngx docker, I need to install a few more pip packages for a post processing script I'm creating (Using ChatGPT to get me the costs in bills and receipts and add it as a field to each document).

I tried to write - 

-it paperless-ngx sh -c 'pip install PyPDF2 openai'

In the Extra Parameters field, and it failed so badly, it messed up the installation, I had to reinstall the docker... (and re-set all the parameters and variables, a big headache).

What should be the trick to do that? What am I missing?

 

Solved by DrMor

  • Author

Replying to myself here for a minute, I made some progress but still no success - 

I wrote - 

--entrypoint /usr/src/paperless/scripts/startup.sh in the "Extra Parameters"

And startup.sh is 

#!/bin/sh
pip install PyPDF2 openai
/usr/sbin/docker-entrypoint.sh


 

But /usr/sbin/docker-entrypoint.sh is probably not the right entrypoint, or I'm missing something obvious here, because the docker doesn't load. Any assistance will be highly appreciated.

I get the error:

/usr/sbin/docker-entrypoint.sh: line 162: $1: unbound variable

 

I then modified startup.sh to be:

#!/bin/sh
pip install PyPDF2 openai
/usr/sbin/docker-entrypoint.sh "$@"

And now I don't see any issues in the log, it just stops and doesn't continue.

 

The log now ends with:

 

Installing collected packages: PyPDF2, pydantic-core, distro, annotated-types, pydantic, openai
Successfully installed PyPDF2-3.0.1 annotated-types-0.7.0 distro-1.9.0 openai-1.35.10 pydantic-2.8.2 pydantic-core-2.20.1
Paperless-ngx docker container starting...
Mapping UID and GID for paperless:paperless to 99:100
Creating directory scratch directory /tmp/paperless
Adjusting permissions of paperless files. This may take a while.
Waiting for Redis...
Connected to Redis broker.
Apply database migrations...
Operations to perform:
  Apply all migrations: account, admin, auditlog, auth, authtoken, contenttypes, django_celery_results, documents, guardian, paperless, paperless_mail, sessions, socialaccount
Running migrations:
  No migrations to apply.
Running Django checks
System check identified no issues (0 silenced).


 

Edited by DrMor

  • Author
  • Solution

For anyone looking to do the same, I solved it. 

startup.sh needs to be:

#!/bin/sh

# Install necessary Python packages
pip install PyPDF2 openai

# Default command if none is provided
if [ -z "$1" ]; then
  set -- "/usr/local/bin/paperless_cmd.sh"
fi

# Execute the original entry point script with provided arguments
exec /sbin/docker-entrypoint.sh "$@"

and "Extra Parameters" is:

--entrypoint /usr/src/paperless/scripts/startup.sh

Important to not forget "chmod +x startup.sh" and the proper path allocation in unraid, in my case from "/mnt/cache/appdata/paperless-ngx/scripts/" to "/usr/src/paperless/scripts"

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.