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

chore(dev): remove nested bash shell #72

Merged
merged 1 commit into from
Feb 20, 2025
Merged
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
8 changes: 5 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ RUN mkdir -p /etc/supervisor/conf.d
COPY .devcontainer/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

WORKDIR /workspace/comfystream
COPY docker/entrypoint.sh /workspace/comfystream/docker/entrypoint.sh
RUN chmod +x /workspace/comfystream/docker/entrypoint.sh
ENTRYPOINT ["/workspace/comfystream/docker/entrypoint.sh"]
COPY .devcontainer/entrypoint.sh /workspace/comfystream/.devcontainer/entrypoint.sh
RUN chmod +x /workspace/comfystream/.devcontainer/entrypoint.sh

ENTRYPOINT ["/workspace/comfystream/.devcontainer/entrypoint.sh"]
CMD ["/bin/bash"]
10 changes: 2 additions & 8 deletions docker/entrypoint.sh → .devcontainer/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ if [ "$1" = "--build-engines" ]; then
shift
fi

if [ "$1" = "--editable" ]; then
cd /workspace/comfystream
conda activate comfystream
pip install -e .
shift
fi

# Install npm packages if needed
cd /workspace/comfystream/ui
if [ ! -d "node_modules" ]; then
Expand All @@ -63,4 +56,5 @@ if [ "$1" = "--server" ]; then
fi

cd /workspace/comfystream
/bin/bash

exec "$@"
7 changes: 4 additions & 3 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash

chmod +x /workspace/comfystream/docker/entrypoint.sh
chmod +x /workspace/comfystream/.devcontainer/entrypoint.sh
cd /workspace/comfystream

# Install Comfystream in editable mode.
/workspace/comfystream/docker/entrypoint.sh --editable
echo -e "\e[32mInstalling Comfystream in editable mode...\e[0m"
/workspace/miniconda3/envs/comfystream/bin/python3 -m pip install -e . > /dev/null

# Create a symlink to the entrypoint script.
echo 'alias prepare_examples="/workspace/comfystream/docker/entrypoint.sh --download-models --build-engines"' >> ~/.bashrc
echo 'alias prepare_examples="/workspace/comfystream/.devcontainer/entrypoint.sh --download-models --build-engines"' >> ~/.bashrc
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@eliteprox I'm fine with keeping it in docker but now have it closer to the container that uses it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this makes more sense in the docker folder, but it's a small nit

echo -e "\e[32mContainer ready! Run 'prepare_examples' to download models and build engines for example workflows.\e[0m"

/bin/bash