cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.45k stars 2.99k forks source link

How can I change the default directory of cvat_worker_import? #8570

Open tms2003 opened 4 days ago

tms2003 commented 4 days ago

Actions before raising this issue

Is your feature request related to a problem? Please describe.

How can I change the default directory of cvat_worker_import? I changed the directory of cvat_worker-import in docke-compose.yml:

cvat_worker_import:
container_name: cvat_worker_import
image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on: *backend-deps
environment:
<<: *backend-env
NUMPROCS: 2
command: run worker.import
volumes:
- cvat_data:/home/incar/mdata4/cvat/data
- cvat_keys:/home/incar/mdata4/cvat/keys
- cvat_logs:/home/incar/mdata4/cvat/logs
networks:
- cvat

As a result, when the task is created, an error occurs when uploading the file: FileNotFoundError: [Errno 2] No such file or directory: '/home/django/data/data/1/raw/1014.jpg'

Obviously the main directory of the container is still /home/django, but it doesn't exist, so an error is reported. So, how can I specify this directory?

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

azhavoro commented 2 days ago

Could you be more specific about what you are trying to achieve? It's not quite clear to me why you need to change the directory inside the containers... If you just want to change the default location of the cvat presistent data, try doing that for all volumes whose location you want to change. Please note that cvat_data volume must be deleted first for the changes to take effect

volumes:
  cvat_data:
    driver_opts:
      type: none
      device: /home/incar/mdata4/cvat/data
      o: bind