Skip to content
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

Use entrypoint style for end-user app #310

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jetson_containers/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ def test_container(name, package, simulate=False):
cmd += f"--volume {package['path']}:/test" + _NEWLINE_
cmd += f"--volume {os.path.join(_PACKAGE_ROOT, 'data')}:/data" + _NEWLINE_
cmd += f"--workdir /test" + _NEWLINE_
cmd += f"--entrypoint /usr/bin/env" + _NEWLINE_
cmd += name + _NEWLINE_

cmd += "/bin/bash -c '"
Expand Down
3 changes: 1 addition & 2 deletions packages/audio/riva-client/Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ RUN pip3 show nvidia-riva-client && python3 -c 'import riva.client; print(riva.c
COPY list_audio_devices.py python-clients/scripts/
COPY loopback.py python-clients/scripts/


WORKDIR /
WORKDIR /
6 changes: 4 additions & 2 deletions packages/diffusion/stable-diffusion-webui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN cd /opt/stable-diffusion-webui && \
# set the cache dir for models
ENV DIFFUSERS_CACHE=/data/models/diffusers

# default start-up command
CMD /bin/bash -c "cd /opt/stable-diffusion-webui && python3 launch.py --data=/data/models/stable-diffusion --enable-insecure-extension-access --xformers --listen --port=7860"
COPY docker-entrypoint.sh /usr/local/bin

WORKDIR /opt/stable-diffusion-webui

ENTRYPOINT ["docker-entrypoint.sh"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

cd /opt/stable-diffusion-webui && python3 launch.py --data=/data/models/stable-diffusion --enable-insecure-extension-access --xformers --listen --port=7860 "$@"
9 changes: 5 additions & 4 deletions packages/jupyterlab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ RUN pip3 install --no-cache-dir --verbose jupyter 'jupyterlab<4' && \
RUN jupyter lab --version && jupyter lab --generate-config
RUN python3 -c "from notebook.auth.security import set_password; set_password('nvidia', '/root/.jupyter/jupyter_notebook_config.json')"

CMD /bin/bash -c "jupyter lab --ip 0.0.0.0 --port 8888 --allow-root &> /var/log/jupyter.log" & \
echo "allow 10 sec for JupyterLab to start @ http://$(hostname -I | cut -d' ' -f1):8888 (password nvidia)" && \
echo "JupterLab logging location: /var/log/jupyter.log (inside the container)" && \
/bin/bash
COPY docker-entrypoint.sh /usr/local/bin

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["/bin/bash"]
9 changes: 9 additions & 0 deletions packages/jupyterlab/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e

jupyter lab --ip 0.0.0.0 --port 8888 --allow-root &> /var/log/jupyter.log &
echo "allow 10 sec for JupyterLab to start @ http://$(hostname -I | cut -d' ' -f1):8888 (password nvidia)"

echo "JupterLab logging location: /var/log/jupyter.log (inside the container)"
exec "$@"
6 changes: 4 additions & 2 deletions packages/llm/text-generation-webui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ ENV LD_PRELOAD=${LD_PRELOAD}:${LD_PRELOAD_LIBS}

COPY settings.json text-generation-webui/

WORKDIR /
COPY docker-entrypoint.sh /usr/local/bin

CMD /bin/bash -c "cd /opt/text-generation-webui && python3 server.py --model-dir=/data/models/text-generation-webui --listen --verbose"
WORKDIR /opt/text-generation-webui

ENTRYPOINT ["docker-entrypoint.sh"]
5 changes: 5 additions & 0 deletions packages/llm/text-generation-webui/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

cd /opt/text-generation-webui && python3 server.py --model-dir=/data/models/text-generation-webui --listen --verbose "$@"
2 changes: 1 addition & 1 deletion packages/tvm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ RUN pip3 show tvm && python3 -c 'import tvm'

ENV TVM_HOME=/opt/tvm

ln -s /opt/mlc-llm/3rdparty/tvm/3rdparty /usr/local/lib/python3.8/dist-packages/tvm/3rdparty
RUN ln -s /opt/mlc-llm/3rdparty/tvm/3rdparty /usr/local/lib/python3.8/dist-packages/tvm/3rdparty