Skip to content

Commit 44ead39

Browse files
authored
chore(dev): remove nested bash shell (yondonfu#72)
This commit ensures that the behavior of the dev container is more consistent with what developers would expect when using the dev container Docker image as a standalone image.
1 parent a93858d commit 44ead39

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

.devcontainer/Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ RUN mkdir -p /etc/supervisor/conf.d
3333
COPY .devcontainer/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
3434

3535
WORKDIR /workspace/comfystream
36-
COPY docker/entrypoint.sh /workspace/comfystream/docker/entrypoint.sh
37-
RUN chmod +x /workspace/comfystream/docker/entrypoint.sh
38-
ENTRYPOINT ["/workspace/comfystream/docker/entrypoint.sh"]
36+
COPY .devcontainer/entrypoint.sh /workspace/comfystream/.devcontainer/entrypoint.sh
37+
RUN chmod +x /workspace/comfystream/.devcontainer/entrypoint.sh
38+
39+
ENTRYPOINT ["/workspace/comfystream/.devcontainer/entrypoint.sh"]
40+
CMD ["/bin/bash"]

docker/entrypoint.sh .devcontainer/entrypoint.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ if [ "$1" = "--build-engines" ]; then
4444
shift
4545
fi
4646

47-
if [ "$1" = "--editable" ]; then
48-
cd /workspace/comfystream
49-
conda activate comfystream
50-
pip install -e .
51-
shift
52-
fi
53-
5447
# Install npm packages if needed
5548
cd /workspace/comfystream/ui
5649
if [ ! -d "node_modules" ]; then
@@ -63,4 +56,5 @@ if [ "$1" = "--server" ]; then
6356
fi
6457

6558
cd /workspace/comfystream
66-
/bin/bash
59+
60+
exec "$@"

.devcontainer/post-create.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/bin/bash
22

3-
chmod +x /workspace/comfystream/docker/entrypoint.sh
3+
chmod +x /workspace/comfystream/.devcontainer/entrypoint.sh
44
cd /workspace/comfystream
55

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

910
# Create a symlink to the entrypoint script.
10-
echo 'alias prepare_examples="/workspace/comfystream/docker/entrypoint.sh --download-models --build-engines"' >> ~/.bashrc
11+
echo 'alias prepare_examples="/workspace/comfystream/.devcontainer/entrypoint.sh --download-models --build-engines"' >> ~/.bashrc
1112
echo -e "\e[32mContainer ready! Run 'prepare_examples' to download models and build engines for example workflows.\e[0m"
1213

1314
/bin/bash

0 commit comments

Comments
 (0)