4

I want to copy a folders/files from my local machine (MAC) to the docker container in Amazon Sagemaker .

I tried using scp commands to copy from local to sagemaker, for folder

scp -r -i <key> <local address> ec2-user@<ip>.compute-1.amazonws.com:/<address>

and then logged in to sagemaker and used `docker cp :/workspace/

I want to move a folder or file directly from my local machine (MAC) to amazon sagemaker docker container using only 1 terminal command. Is there a way to do that ?

Eyshika
  • 1,041
  • 1
  • 11
  • 18
  • Do I understand you correctly: you want to copy something into the docker container? That is usually done using the dockerfile. – avermaet Jul 01 '19 at 17:18
  • Yes I want to copy something in docker container from my local machine , but that docker container is in amazon sagemaker – Eyshika Jul 01 '19 at 17:24
  • Also according to `https://docs.docker.com/engine/reference/commandline/cp/` the docker cp`commands copies only from local filesystem to the docker container. So I don't think it's taking an URL. Maybe try scp from local to Amazon server and docker cp on the server. – avermaet Jul 01 '19 at 17:25
  • the commands you shared are for using docker directly, but when I do `docker cp` that doesn't work, may be because I want to copy it to sagemaker thats where docker container is – Eyshika Jul 01 '19 at 21:15
  • Yes, thats what I meant: copy first to the Amazon server and do it "locally" there. – avermaet Jul 01 '19 at 21:21
  • edited question... – Eyshika Jul 03 '19 at 18:40

0 Answers0