Cvat: Can't mount data (share_path)

Created on 6 Oct 2020  Â·  10Comments  Â·  Source: openvinotoolkit/cvat

Hi. I am newbie about docker usage. I have a dataset with lots of photos. I want to label them into CVAT. As mentioned in doc, I should mount my dataset into docker. I tried multiple things. I edit and rebuilded docker-compose.yml and docker-composo.override.yml but still docker can't acces my dataset. My OS is Windows 10 with WSL2. In the example share_path, the path is /mnt/share. Do I need to give path of my dataset like C:/Users/Desktop/.../ or do I need to give path of WSL2 for windows?

documentation

Most helpful comment

this seemed to work for me:

  1. create a volume
docker volume create --name cvat_share --opt type=none --opt device=/home/cbc/my_shared_folder --opt o=bind
  1. tell docker to search for a volume created externally
# docker-compose.override.yml
version: "3.3"

services:
  cvat:
    environment:
      CVAT_SHARE_URL: ""
    volumes:
      - cvat_share:/home/django/share:ro

volumes:
  cvat_share:
    external: true

All 10 comments

Hi @dasmehdix. Here's how I got it to work in docker-compose.override.yml:

version: "2.3"
services:
cvat:
environment:
CVAT_SHARE_URL: "Mounted from the e:\VoTT host directory"
volumes:
- type: bind
source: "e:\VoTT"
target: /home/django/share

just replace with your source location. and make sure your indentation is right since github is flattening them

Hi @dasmehdix. Here's how I got it to work in docker-compose.override.yml:

version: "2.3"
services:
cvat:
environment:
CVAT_SHARE_URL: "Mounted from the e:\VoTT host directory"
volumes:

  • type: bind
    source: "e:\VoTT"
    target: /home/django/share

just replace with your source location. and make sure your indentation is right since github is flattening them

Let's say my dataset is in path C:\Users\XX\Desktop\YY in windows enviroment.

version: "2.3"
services:
cvat:
environment:
CVAT_SHARE_URL: "Mounted from the C:\Users\XX\Desktop\YY host directory"
volumes:

  • type: bind
    source: "C:\Users\XX\Desktop\YY"
    target: /home/django/share

So, is this configuration true for my enviroment?
BTW, thanks for answer.

Edit:
ERROR: create cvat_cvat_share: invalid option: "source"
This problem appers when I run that .yml file.

do I need to give path of WSL2 for windows

I suppose, yes. Since you run docker under WSL, you need to provide path in WSL.
BTW, we updated docker-compose version to 3.3 in develop branch, just for your information.

Hello,

Using CVAT directly in Windows 10 (without WSL).
Tried mounting data and encountered the following errors.

ERROR: for cvat Cannot create container for service cvat: failed to mount local volume: mount E:\e\cvat_data:/var/lib/docker/volumes/cvat_cvat_share/_data, flags: 0x1000: no such file or directory

My docker-compose.override.yml file

version: "2.3"
services:
  cvat_proxy:
    environment:
      CVAT_HOST: "localhost"

  cvat:
    environment:
      CVAT_SHARE_URL: "Mounted from /e/cvat_data host directory"
    volumes:
      - cvat_share:/home/django/share:ro

volumes:
  cvat_share:
    driver_opts:
      type: none
      device: /e/cvat_data
      o: bind

Tried all possible combinations for the paths representations, but still can't mount the storage!
Could you please have a look?

Thanks a lot!

If you’re doing it with hyperv you need to go into docker and share that directory with the docker instance

Jack Neil
CEO / Hank AI, Inc.
jack.[email protected]
(w) +1.904.GET.HANK
(m) +1.803.466.7551

Sent via Superhuman iOS ( https://sprh.mn/[email protected] )

On Thu, Oct 22 2020 at 9:55 AM, veer5551 < [email protected] > wrote:

Hello,

Using CVAT directly in Windows 10 (without WSL).
Tried mounting data and encountered the following errors.

ERROR: for cvat Cannot create container for service cvat: failed to mount
local volume: mount
E:\e\cvat_data:/var/lib/docker/volumes/cvat_cvat_share/_data, flags:
0x1000: no such file or directory

My docker-compose.override.yml file

version: "2.3"
services:
cvat_proxy:
environment:
CVAT_HOST:
"localhost"

cvat:
environment:
CVAT_SHARE_URL: "Mounted from
/e/cvat_data host directory"
volumes:
-
cvat_share:/home/django/share:ro

volumes:
cvat_share:
driver_opts:

type: none
device: /e/cvat_data
o: bind

Tried all possible combinations for the paths representations, but still
can't mount the storage!
Could you please have a look?

Thanks a lot!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
https://github.com/openvinotoolkit/cvat/issues/2263#issuecomment-714511277
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AGFRM5SBP5S4UFISGMJAW4TSMA2VZANCNFSM4SF2PDRA
).

Yes @jackneil, that was the first thing I did.
I wonder, I was able to successfully mount Data with same override file with previous version of CVAT.

Need to look a little deeper into the issue I guess!
Thanks!

Hello,

Having hard time figuring it out!
Below is the Image showing Error + File Sharing enabled in Docker Desktop + compose.override file

image

Has any one figured it out?
Am missing something ?

Thanks a lot!

this seemed to work for me:

  1. create a volume
docker volume create --name cvat_share --opt type=none --opt device=/home/cbc/my_shared_folder --opt o=bind
  1. tell docker to search for a volume created externally
# docker-compose.override.yml
version: "3.3"

services:
  cvat:
    environment:
      CVAT_SHARE_URL: ""
    volumes:
      - cvat_share:/home/django/share:ro

volumes:
  cvat_share:
    external: true

Hey @ChrisCurrin,
Thanks a lot!! That worked Effortlessly!
Saved me!

Thanks!

I tried what is documented in https://github.com/openvinotoolkit/cvat/blob/master/cvat/apps/documentation/installation.md#share-path
and got "no data" in the Web UI when I picked the Connected File Share tab.

After excessive staring, head scratching, and ruling out other possible issues, I got the documented method to work. I simply had a service mixup (cvat vs cvat_proxy)... no error gets generated if you put a def in the wrong service, it just fails to work.

One thing that would be helpful is that
https://github.com/openvinotoolkit/cvat/blob/master/cvat/apps/documentation/installation.md#share-path
should mention that there must be some files in order for it to appear in the web UI.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MahdiEsf picture MahdiEsf  Â·  3Comments

JK-97 picture JK-97  Â·  3Comments

oostap1 picture oostap1  Â·  3Comments

yanmu2017 picture yanmu2017  Â·  4Comments

davodogster picture davodogster  Â·  4Comments