R
RunPod10mo ago
Arahizzz

/usr/bin/bash: cannot execute binary file

I'm trying to set up custom template with my own container image. When I try to set up SSH according to docs (https://docs.runpod.io/pods/configuration/use-ssh) I get errors on container start: 2024-02-18T17:40:55.341955276Z /usr/bin/bash: /usr/bin/bash: cannot execute binary file 2024-02-18T17:41:11.745017647Z /usr/bin/bash: /usr/bin/bash: cannot execute binary file 2024-02-18T17:41:28.059617609Z /usr/bin/bash: /usr/bin/bash: cannot execute binary file 2024-02-18T17:41:44.387377159Z /usr/bin/bash: /usr/bin/bash: cannot execute binary file 2024-02-18T17:42:00.764592909Z /usr/bin/bash: /usr/bin/bash: cannot execute binary file 2024-02-18T17:42:17.092566318Z /usr/bin/bash: /usr/bin/bash: cannot execute binary file
Use SSH | RunPod Documentation
The basic terminal SSH access that RunPod exposes is not a full SSH connection and, therefore, does not support commands like SCP. If you want to have full SSH capabilities, then you will need to rent an instance that has public IP support and run a full SSH daemon in your Pod.
No description
No description
No description
Solution:
@Arahizzz remove ENTRYPOINT ["/bin/bash"] from image and rebuild image
Jump to solution
13 Replies
ashleyk
ashleyk10mo ago
What kind of image is this? Looks like it has an issue with bash for some reason.
Arahizzz
ArahizzzOP10mo ago
Here's Dockerfile. It works fine in vast.ai FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=on \ SHELL=/bin/bash \ NVIDIA_VISIBLE_DEVICES=all \ NVIDIA_DRIVER_CAPABILITIES=compute,utility \ PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install dependencies RUN apt-get update && apt-get install -y python3-pip python3-dev python3-venv git wget vim tmux gettext-base && \ wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz && \ tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz && \ rm -r go1.21.6.linux-amd64.tar.gz /var/lib/apt/lists/* ENV PATH="${PATH}:/usr/local/go/bin" # Install hfdownloader RUN git clone https://github.com/bodaay/HuggingFaceModelDownloader /HuggingFaceModelDownloader && \ cd /HuggingFaceModelDownloader/ && ./BuildLinuxAmd64.sh \ chmod +x /HuggingFaceModelDownloader/output/hfdownloader_linux_amd64_1.2.9 && \ mv /HuggingFaceModelDownloader/output/hfdownloader_linux_amd64_1.2.9 /usr/local/bin/hfdownloader && \ mkdir /models # Install tabbyAPI RUN git clone https://github.com/theroyallab/tabbyAPI /app/tabbyAPI && \ rm -r /app/tabbyAPI/models && ln -s /models /app/tabbyAPI/models && \ cd /app/tabbyAPI && python3 -m venv venv \ && . venv/bin/activate \ && pip3 install -U -r requirements.txt WORKDIR /app/tabbyAPI COPY config_template.yml config_template.yml COPY run_tabby.sh run_tabby.sh RUN chmod +x run_tabby.sh # Expose ports for exllama EXPOSE 5000 ENTRYPOINT ["/bin/bash"]
justin
justin10mo ago
its bc ur tabby dockerfile doesnt have openssh i recommend ur FROM should use runpod pytorch template cause its built with pytorch + cuda + ubuntu too so ur bash is trying to set up openssh but it doesnt exist also looks like ur setting up ssh: can read this https://discord.com/channels/912829806415085598/1194711850223415348
Solution
Madiator2011
Madiator201110mo ago
@Arahizzz remove ENTRYPOINT ["/bin/bash"] from image and rebuild image
justin
justin10mo ago
oh i see.. their bash script is apt-get installing openssh 👁️
Madiator2011
Madiator201110mo ago
nope ENTRYPOINT ["/bin/bash"] has higher priority than docker start command
justin
justin10mo ago
Oh wow learnt something new didnt realize the interaction between cmd/run/entrypoint huh; great to know Chatgpt says maybe can add a —entrypoint flag to run command too, to override the entrypoint on run 👁️ maybe can add that before rebuilding the image too with entrypoint removed ; tho rebuilding shouldnt be bad either cause everything would be cached
Madiator2011
Madiator201110mo ago
nope as it's high level argument
justin
justin10mo ago
dang
Madiator2011
Madiator201110mo ago
just remove ENTRYPOINT ["/bin/bash"] from docker image and it should work
Madiator2011
Madiator201110mo ago
enjoy photo of it admin destroying docker container Good night
No description
ashleyk
ashleyk10mo ago
Yeah I also had to chage my Docker images back from ENTRYPOINT to CMD so that people can override the docker command.
Arahizzz
ArahizzzOP10mo ago
I removed ENTRYPOINT and it worked. Thank you, all.
Want results from more Discord servers?
Add your server