使用docker启动jupyter笔记本时,运行容器时遇到目录问题。docker-v安装也不能正常工作

使用docker启动jupyter笔记本时,运行容器时遇到目录问题。docker-v安装也不能正常工作,docker,github,containers,Docker,Github,Containers,我正在按照此存储库中的说明进行操作 I.下载数据并创建环境 Download SpaceNet 7 Data The SpaceNet data is freely available on AWS, and all you need is an AWS account and the AWS CLI installed and configured. Once you’ve done that, simply run the command below to download the tra

我正在按照此存储库中的说明进行操作

I.下载数据并创建环境

Download SpaceNet 7 Data

The SpaceNet data is freely available on AWS, and all you need is an AWS account and the AWS CLI installed and configured. Once you’ve done that, simply run the command below to download the training dataset to your working directory (e.g. /local_data/sn7/aws_download/):

 cd /local_data/sn7/aws_download/
 aws s3 cp s3://spacenet-dataset/spacenet/SN7_buildings/tarballs/SN7_buildings_train.tar.gz .
 aws s3 cp s3://spacenet-dataset/spacenet/SN7_buildings/tarballs/SN7_buildings_test_public.tar.gz .

Extract data from the tarballs:

  cd /local_data/sn7/aws_download/
  tar -xvf SN7_buildings_train.tar.gz
  tar -xvf SN7_buildings_test_public.tar.gz

Download SpaceNet 7 baseline code to the desired location (e.g. /path_to_baseline/):

 cd /path_to_baseline/
 git clone https://github...
然而,我不明白,一旦我运行了图像并进入交互式bashshell,我该如何从容器中运行jupyter笔记本

步骤3:

构建并启动依赖Solaris的docker容器(建议使用支持GPU的机器和nvidia docker):

要在步骤3中运行的命令

 nvidia-docker build -t sn7_baseline_image /path_to_baseline/docker 
 NV_GPU=0 nvidia-docker run -it -v /local_data:/local_data  -ti --ipc=host --name sn7_gpu0 sn7_baseline_image
 conda activate solaris
步骤4:执行命令

这对我来说是一个问题,因为当我在步骤3中运行命令时,我进入bashshell,无法访问基线

Either use the jupyter notebook:

 cd /path_to_baseline/
 jupyter notebook --ip 0.0.0.0 --port=9111 --no-browser --allow-root &

Locally in your browser, visit:

 http://localhost:9111

Or simply copy the relevant commands into a terminal within the docker container
当前目录为空。 (solaris)root@c0011f0fc9bf:/tmp#ls

solaris tmp2rhskj3a_内核

(solaris)root@c0011f0fc9bf:/tmp#cd

(solaris)root@c0011f0fc9bf:/#ls

basel bin boot dev etc home lib lib64本地_数据媒体mnt opt proc root运行sbin srv sys tmp usr var

(solaris)root@c0011f0fc9bf:/#

步骤3中的命令NV_GPU=0 nvidia docker run-it-v/local_data:/local_data不会将任何内容装载到/var/lib/docker/volumes中的我的文件夹中/


我是dockers和running containers的初学者,因此非常感谢您的帮助。

由于外部链接信息可能会更改或消失,为了使您的问题对未来读者有用,请编辑此问题以获得理解您的问题所需的所有信息。我不能将照片直接嵌入到帖子中,因为我没有10个声誉。