Skip to content

Conversation

humitos
Copy link
Member

@humitos humitos commented Feb 18, 2025

When running on Ubuntu 24.04, we cannot use --system anymore because pip complains about it. I understand we are forced to create a virtualenv when creating the Docker image.

Due to that, we need to run our application using that virtualenv we created at build time. We use uv run for that.

Required by readthedocs/readthedocs.org#12002

When running on Ubuntu 24.04, we cannot use `--system` anymore because pip
complains about it. I understand we are forced to create a virtualenv when
creating the Docker image.

Due to that, we need to run our application using that virtualenv we created at
build time. We use `uv run` for that.
@humitos humitos requested a review from a team as a code owner February 18, 2025 15:34
@humitos humitos requested a review from stsewd February 18, 2025 15:34
@@ -9,7 +9,7 @@
# Ref https://docs.celeryq.dev/en/stable/userguide/workers.html#persistent-revokes.
CELERY_STATE_DIR=/var/run/celery/
mkdir -p $CELERY_STATE_DIR
CMD="python3 -m celery -A ${CELERY_APP_NAME}.worker worker -Ofair -c 1 -Q builder,celery,default,build01,build:default,build:large -l ${CELERY_LOG_LEVEL} --statedb=${CELERY_STATE_DIR}worker.state"
CMD="uv run python3 -m celery -A ${CELERY_APP_NAME}.worker worker -Ofair -c 1 -Q builder,celery,default,build01,build:default,build:large -l ${CELERY_LOG_LEVEL} --statedb=${CELERY_STATE_DIR}worker.state"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we can just drop the number now

Suggested change
CMD="uv run python3 -m celery -A ${CELERY_APP_NAME}.worker worker -Ofair -c 1 -Q builder,celery,default,build01,build:default,build:large -l ${CELERY_LOG_LEVEL} --statedb=${CELERY_STATE_DIR}worker.state"
CMD="uv run python -m celery -A ${CELERY_APP_NAME}.worker worker -Ofair -c 1 -Q builder,celery,default,build01,build:default,build:large -l ${CELERY_LOG_LEVEL} --statedb=${CELERY_STATE_DIR}worker.state"

Copy link
Member Author

@humitos humitos Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably. I ran all the tests with python3 and there are a lot of connected pieces. I prefer if we keep it as-is for now to avoid having to re-test everything again. It's just a syntax sugar, tho.

I want to move forward for now with this and we can come back to it.

@humitos humitos merged commit 39d863f into main Feb 19, 2025
@humitos humitos deleted the humitos/ubuntu24.04-uv branch February 19, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants