Support for installation of additional python modules on nicegui docker start #3438
zan73
started this conversation in
Ideas / Feature Requests
Replies: 2 comments 5 replies
-
Do you have examples of popular images doing something similar? The "normal" way is to create your own Dockerfile and use it as a base to install the packages yourself. Like FROM zauberzeug/nicegui:1.4.31
COPY requirements.txt .
RUN pip install -r requirements.txt |
Beta Was this translation helpful? Give feedback.
2 replies
-
How about if we drive this via an environment variable. That way the end-user opts-in to the use of a requirements file. DockerFile change: ENV REQUIREMENTS_FILE="" And add this to /resources/docker-entrypoint.sh: #Install Python modules from a requirements file passed as ENV variable to Docker
if [ -n "$REQUIREMENTS_FILE" ]; then \
echo "Installing Python modules from $REQUIREMENTS_FILE"; \
if ! pip install -r "$REQUIREMENTS_FILE"; then \
echo "ERROR: Failed to install Python modules from $REQUIREMENTS_FILE" >&2; \
exit 1; \
fi; \
fi |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Potentially execute pip install -r requirements.txt if /app/requirements.txt exists, as part of docker startup
Beta Was this translation helpful? Give feedback.
All reactions