alibaba/EasyRec

docker 开发环境搭建失败

GH1995 opened this issue · 2 comments

我用的 docker 链接是 https://hub.docker.com/repository/docker/gh1995/easyrec-dev ,基于 mybigpai-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.4.7,具体命令如下

# 创建容器
docker run -itd --name easyrec -p 10022:22 -p 10023:10023 -v ${PWD}:/app/ gh1995/easyrec-dev:latest bash
# 进入容器
docker exec -it easyrec bash
cd /root
# 创建空文件
mkdir .ssh
touch /root/.ssh/authorized_keys
# 设置文件权限
chmod 644 /root/.ssh/authorized_keys
# 复制公钥
cp ~/.ssh/id_rsa.pub /app
cd /app
cat /app/id_rsa.pub >> /root/.ssh/authorized_keys

此外,我还做了如下设置

将
PasswordAuthentication yes
改为
PasswordAuthentication no

如果行首有#号,将#号去掉

新增一行:
PermitRootLogin prohibit-password
/etc/init.d/ssh restart

在容器外ssh连接正常,但是无法用 PyCharm 上传代码,vs code 也存在同样的问题

image

image

image

update /etc/bash.bashrc to remove the tensorflow prompt, which prevents sftp to parse ssh messages correctly:
image

update /etc/bash.bashrc to remove the tensorflow prompt, which prevents sftp to parse ssh messages correctly: image

未能解决问题