docker is displaying error regarding absolute path while installing label-studio - docker

I am working on NER ML model which requires label-studio to be get installed on the pc. I am using this command
`docker run -it -p 8080:8080 -v `pwd`/mydata:/label-studio/data heartexlabs/label-studio:latest`
for installation of label-studio in terminal but getting the below error.
docker: Error response from daemon: create `pwd`/mydata: "`pwd`/mydata" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
The docker is running on windows 10.
Any help in this regard will be highly appreciated.
Thank You

`pwd` can't be used on Windows, it's linux-only. Replace it with absolute paths please, e.g.:
docker run -it -p 8080:8080 -v c:/projects/mydata:/label-studio/data heartexlabs/label-studio:latest

Related

Docker: Invalid characters (%cd%) for local volume - Windows 10

When trying to mount a local volume using docker run on Windows 10, Docker version 20.10.12, using
docker run -it -v -p 3000:3000 %cd%:/usr/src/app rails6
I get the error response:
docker: Error response from daemon: create %cd%: "%cd%" includes
invalid characters for a local volume name, only
"[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a
host directory, use absolute path.
The solution was to run in PowerShell, using the delimited, automatic variable ${pwd}.
docker run -it -v -p 3000:3000 ${pwd}:/usr/src/app rails6

Running docker container on windows with a volume gives me an error

I'm trying to run a simple docker image with a volume
docker run -dit -v J:\dvolumes:/data ubuntu
However I get the following error
docker: Error response from daemon: invalid mode: data.
I'm guessing it's thinking the ':' after the J is what separates the volume but I don't really know how to make it think otherwise (if that's the case).
Any help would be greatly appreciated
Issue was that I was trying to run the container in WSL2 so I should be using linux paths
WSL2
docker run -dit -v /j/dvolumes:/data ubuntu
Windows
docker run -dit -v j:/dvolumes:/data ubuntu

Run cypress test in a docker container?

How to run cypress test in a docker container ? I have created an account in docker and then as per link https://hub.docker.com/u/cypress and run the following command from my folder location in Desktop/Windows 10 : docker run -it -v $PWD:/e2e -w /e2e cypress/included:3.4.0
But I am getting following error. How can I resolve the error, can someone please advise.
docker: Error response from daemon: create $PWD: "$PWD" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
Depending on your OS you need to change $PWD to reflect your current folder (ex: $(pwd) on linux or MacOS).
If you can't figure it out just use an absolute path instead of $PWD, just like the docker hint indicates.

Docker-volume: I am trying to make a container by using a volume which is already made

I am working on this problem on Windows 10 and using Git-bash.
First, I have made a volume named "myvolume" with the command:
docker volume create myvolume
And I tried to make a Ubuntu container with the command:
docker run -i -t --name newvolume -v myvolume:/root/ ubuntu
However, I get the error message:
C:/Program Files/Docker/Docker/Resources/bin/docker.exe: Error response from daemon: create myvolume;C: "myvolume;C" includes invalid characters for a
local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'C:/Program Files/Docker/Docker/Resources/bin/docker.exe run --help'.
I guess the problem occurs in Windows 10, and not in the Linux environment,
but I would like to figure out it in Windows.
Anyone know this problem?
Thank you in advance :)

Run docker container Error: Could not find base path /models/model for servable model

Im have problem when I've trying to run a docker container using docker image: tensorflow/serving.
I run the cmd:
docker run --name=tf_serving -it tensorflow/serving
The result is:
2019-10-28 04:23:56.858540: I tensorflow_serving/model_servers/server_core.cc:462] Adding/updating models.
2019-10-28 04:23:56.858571: I tensorflow_serving/model_servers/server_core.cc:573] (Re-)adding model: model
2019-10-28 04:23:56.858852: E tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:362] FileSystemStoragePathSource encountered a filesystem access error: Could not find base path /models/model for servable model
I've digging to resolve it but still there. Could anyone please have any idea for this, thanks so much!
I found the solution, for someone who has the same problems, we need to provide the model path in the local computer and in docker:
docker run --name=the_name -p 9000:9000 -it -v "/path_to_the_model_in_computer:/path_to_model_in_docker" tensorflow/serving:1.15.0 --model_name=MODEL_NAME --port=9000
I encountered the same problem
docker run -p 8501:8501 --name tensorflowserving \
--mount type=bind,source=absolute path to model/resnet,target=/models/resnet \
-e MODEL_NAME=resnet -t tensorflow/serving
The models was the course of this error in my case.
explaination of arguements which i found very helpful
-p 8501:8501: This is the REST Endpoint port. Every prediction request will be made to this port. For instance, you can make a
prediction request to http://localhost:8501.
— name tensorflowserving: This is a name given to the Docker
container running TF Serving. It can be used to start and stop the
container instance later.
— mount type=bind,source=/Users/tf-server/img_classifier/,
target=/models/img_classifier: The mount command simply copies the
model from the specified path (/Users/tf-server/img_classifier/) into
the Docker container (/models/img_classifier), so that TF Serving has
access to it
You should provide the saved model path. Serving container will find all the models in its /models dir. You can use -v for docker run command. Doing like this:
docker run --name=tf_serving -it -v /path/to/saved_model:/models/saved_model tensorflow/serving

Resources