cleanup(docker): Update comfyui-base to allow specifying alternate entrypoint#577
cleanup(docker): Update comfyui-base to allow specifying alternate entrypoint#577
Conversation
…trypoint. Update .dockerignore to reduce image size - Added a new entrypoint script `byoc-entrypoint.sh` to streamline the execution of the BYOC server. - Updated the Dockerfile to copy the new entrypoint script and set appropriate permissions. - Expanded `.dockerignore` to exclude additional cache and build artifacts for cleaner Docker images.
There was a problem hiding this comment.
Pull request overview
This PR enhances the flexibility of the comfyui-base Docker image by introducing a wrapper entrypoint script that allows users to run alternate commands (like /bin/bash or build/download commands) while maintaining backward compatibility with the default BYOC server execution.
Key changes:
- Added a new
byoc-entrypoint.shwrapper script that conditionally executes the BYOC server or custom commands - Refactored the Dockerfile ENTRYPOINT to use the wrapper script instead of directly invoking conda run
- Expanded
.dockerignoreto exclude common Python cache and build artifacts
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docker/byoc-entrypoint.sh | New entrypoint wrapper that allows running alternate commands while defaulting to BYOC server execution |
| docker/Dockerfile.base | Updated to copy and use the new entrypoint script, enabling flexible command execution |
| .dockerignore | Expanded to exclude additional cache directories and build artifacts for cleaner Docker images |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docker/Dockerfile.base
Outdated
| COPY ./workflows/comfyui/* /workspace/ComfyUI/user/default/workflows/ | ||
| COPY ./test/example-512x512.png /workspace/ComfyUI/input | ||
| COPY ./docker/entrypoint.sh /workspace/comfystream/docker/entrypoint.sh | ||
| COPY ./docker/byoc-entrypoint.sh /usr/local/bin/byoc-entrypoint.sh |
There was a problem hiding this comment.
The byoc-entrypoint.sh script is copied after the entire source tree is copied at line 85 with "COPY . /workspace/comfystream". This means the script is already available at /workspace/comfystream/docker/byoc-entrypoint.sh, making this redundant COPY operation unnecessary. Consider removing this line or moving it before line 85 if you want to copy it independently of the full source tree.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…Dockerfile - Deleted the `byoc-entrypoint.sh` script as it is no longer needed. - Updated the Dockerfile to use the existing `entrypoint.sh` script for running the BYOC server. - Adjusted permissions for the new entrypoint to ensure proper execution.
This resolves an issue preventing comfyui-base from being used to download/build engines or run alternate entry commands like
/bin/bash. The change improves usability oflivepeer/comfyui-base.dockerignoreto exclude additional cache and build artifacts for cleaner Docker images.