-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom Python packages #2600
Comments
Migration to uv wasn't supposed to change this. Neither installation should work with UID 1000 which is used by the container. You should first change UID to 0 before doing changes to the system. This is documented in https://docs.weblate.org/en/latest/admin/install/docker.html#overriding-settings-by-extending-the-docker-image (but the docs wasn't updated for uv). |
I've updated the docs WeblateOrg/weblate@177dff0 |
Thank you for the fast response, that did work for me! |
The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.
|
Describe the issue
Since Weblate version 5.5, one of the changes is:
I am using the package elastic-apm for monitoring and a custom Python module for label changes.
Both I'm not able to install anymore.
I already tried
Steps to reproduce the behavior
What I used to do in the dockerfile until version 5.4.3.1:
FROM weblate/weblate:5.4.3.1
RUN pip install elastic-apm
RUN echo 'INSTALLED_APPS += ("elasticapm.contrib.django",)' >> "/app/data/settings-override.py"
RUN echo "MIDDLEWARE += ('elasticapm.contrib.django.middleware.Catch404Middleware',)" >> "/app/data/settings-override.py"
RUN echo "ELASTIC_APM = {'DJANGO_TRANSACTION_NAME_FROM_ROUTE': True, 'DEBUG': True}" >> "/app/data/settings-override.py"
COPY --chown=weblate:weblate weblate_customization/ /usr/lib/python3.9/site-packages/weblate_customization/
RUN pip install -e /usr/lib/python3.9/site-packages/weblate_customization/
RUN echo "CHECK_LIST += ('weblate_customization.checks.TranslationSameAsKeyCheck',)" >> "/app/data/settings-override.py"
But since UV, Python package and project manager is used (version 5.5+), I tried:
RUN uv pip install elastic-apm
but the response is:
error: failed to create file
/app/venv/.lock
Caused by: Permission denied (os error 13)
Same for the weblate_customization package:
RUN uv pip install /usr/lib/python3.12/site-packages/weblate_customization/ -editable
error: failed to create file
/app/venv/.lock
Caused by: Permission denied (os error 13)
I have also looked up the documentation, but there UV is not mentioned at all:
https://docs.weblate.org/en/latest/admin/customize.html
Expected behavior
I would expect I can simply install the elastic-apm package and custom Weblate modules without altering file permissions or changing user rights.
Screenshots
No response
Exception traceback
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: