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

容器内缺少基础bash指令 #9

Open
EasonQYS opened this issue Apr 8, 2024 · 2 comments
Open

容器内缺少基础bash指令 #9

EasonQYS opened this issue Apr 8, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@EasonQYS
Copy link
Member

EasonQYS commented Apr 8, 2024

Is your feature request related to a problem? Please describe.
容器内没有基础bash

# ping baidu.com
/usr/bin/sh: 2: ping: not found
# unzip
/usr/bin/sh: 3: unzip: not found
# ls
checkpoints  datasets  mmedu_code.py  my_checkpoints  run.sh

希望可以有wget和unzip这两个。

Describe the solution you'd like
容器内pip没问题(网络也没问题),但是好像缺一些指令,希望能够提供zip解压和wget。

@simonyangcj
Copy link
Member

simonyangcj commented Apr 9, 2024

嗨 Eason 同学,我来重新打一个镜像,如果嫌下载麻烦可以按照以下方法自己重新打镜像

mkdir open-hydra-image-builder
cd open-hydra-image-builder
cat < Dockerfile
FROM 99cloud/jupyter:Python-3.8.18-dual-lan

RUN apt-get update -y && apt install unzip wget iputils-ping -y

WORKDIR /root/openhydra
EXPOSE 5000
EXPOSE 8888
CMD ["bash","run.sh"]
EOF
docker build . -t 99cloud/jupyter:Python-3.8.18-dual-lan-busybox
# 然后到服务起上
kubectl edit cm -n open-hydra  open-hydra-config
# 修改配置
# 将 imageRepo: "docker.io/99cloud/jupyter:Python-3.8.18-dual-lan" 改为 imageRepo: "docker.io/99cloud/jupyter:Python-3.8.18-dual-lan-busybox"
# 让后保存 wq
# 重启服务
kubectl scale deployment open-hydra-server --replicas=0 -n open-hydra
#  等1秒
kubectl scale deployment open-hydra-server --replicas=1 -n open-hydra
# 关掉之前的 lab 然后重新启动就好了

@simonyangcj simonyangcj added the enhancement New feature or request label Apr 9, 2024
@simonyangcj
Copy link
Member

新的镜像已经打好了,确保服务器下载新的镜像而不是用本地的,你可以登陆服务器运行 ctr -n k8s.io i pull docker.io/99cloud/jupyter:Python-3.8.18-dual-lan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants