inveniosoftware / inveniosoftware/invenio-cli
Setting up an RDM instance according to documentation fails
- Dominant language
- Python
- Stars
- 14
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
Package version (if known): 1.9.2
## Describe the bug
I created a new rdm instance and it will fail building containers. First, the Pipfile will say python_version ="3.12" even when the env I run invenio-cli init rdm from has python 3.9. If I leave it as 3.12, it will fail because the base image only has 3.9. In that case, the user first has to figure out how to install python 3.12 on top of the base image. In either case, pipenv install --deploy --system will install the packages somewhere where it cannot be found by the call to `invenio collect --verbose && invenio webpack buildall` It is very frustrating to be confronted with so many bugs right at the start.
## Steps to Reproduce
invenio-cli init rdm
(change python 3.12 from Pipfile to 3.9)
invenio-cli containers start --lock --build --setup
## Expected behavior
According to the docs, this should build and run my containers.
## Screenshots (if applicable)
> [web-api 11/11] RUN cp -r ./static/. /opt/invenio/var/instance/static/ && cp -r ./assets/. /opt/invenio/var/instance/assets/ && invenio collect --verbose && invenio webpack buildall:
0.320 Traceback (most recent call last):
0.320 File "/usr/local/bin/invenio", line 5, in
0.320 from invenio_app.cli import cli
0.320 File "/usr/local/lib/python3.9/site-packages/invenio_app/__init__.py", line 171, in
0.320 from .ext import InvenioApp
0.320 File "/usr/local/lib/python3.9/site-packages/invenio_app/ext.py", line 14, in
0.320 from flask import Blueprint, g, request
0.320 File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 6, in
0.320 from .app import Flask as Flask
0.320 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 14, in
0.320 import click
0.320 ModuleNotFoundError: No module named 'click'
## Additional context
This is the Dockerfile (it hasnt been changed at all):
FROM registry.cern.ch/inveniosoftware/almalinux:1
COPY site ./site
COPY Pipfile Pipfile.lock ./
RUN pipenv install --deploy --system
COPY ./docker/uwsgi/ ${INVENIO_INSTANCE_PATH}
COPY ./invenio.cfg ${INVENIO_INSTANCE_PATH}
COPY ./templates/ ${INVENIO_INSTANCE_PATH}/templates/
COPY ./app_data/ ${INVENIO_INSTANCE_PATH}/app_data/
COPY ./translations/ ${INVENIO_INSTANCE_PATH}/translations/
COPY ./ .
RUN cp -r ./static/. ${INVENIO_INSTANCE_PATH}/static/ && \
cp -r ./assets/. ${INVENIO_INSTANCE_PATH}/assets/ && \
invenio collect --verbose && \
invenio webpack buildall
ENTRYPOINT [ "bash", "-c"]
If I dont change python 3.12 in the Pipfile to python 3.9, I used to get an error like "python 3.12 is not available on your system", but now it just gives the same error as above (no module named click")
Contributor guide
Assessment
This issue has not been assessed yet.