CVAT挂载MINIO
https://opencv.github.io/cvat/docs/administration/advanced/installation_automatic_annotation/
export CVAT_HOST=10.9.98.213
export no_proxy=localhost,127.0.0.1,.example.com,172.19.0.0/16,172.20.0.0/16,172.17.0.0/16
docker-compose up -d <pre class="line-numbers language-none"><code class="language-none"> ```shell docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser'<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span>
docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f components/serverless/docker-compose.serverless.yml -f components/cuda/docker-compose.cuda.yml -f components/analytics/docker-compose.analytics.yml -f components/tf_annotation/docker-compose.tf_annotation.yml -f docker-compose.override.yml build
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f components/serverless/docker-compose.serverless.yml -f components/cuda/docker-compose.cuda.yml -f components/openvino/docker-compose.openvino.yml -f components/analytics/docker-compose.analytics.yml -f components/tf_annotation/docker-compose.tf_annotation.yml -f docker-compose.override.yml up -d --build
创建用户
docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser'
s3fs挂载minio存储
安装 s3fs:
sudo apt install s3fs
在文件中输入您的凭据
${HOME}/.passwd-s3fs
并设置仅所有者权限:echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs chmod 600 ${HOME}/.passwd-s3fs
user_allow_other
在/etc/fuse.conf
文件中取消注释:sudo nano /etc/fuse.conf
运行 s3fs,替换
bucket_name
,mount_point
:$ s3fs test /mnt/share/ -o passwd_file=${HOME}/.passwd-s3fs -o url=http://localhost:9000/ -o use_path_request_style
自动挂载
按照上面的前 3 个安装步骤进行操作。
使用 fstab
使用以下内容创建一个名为 aws_s3_fuse 的 bash 脚本(例如在 /usr/bin 中,以 root 身份)(替换
user_name
将安装磁盘的代表,backet_name
,mount_point
,/path/to/.passwd-s3fs
):#!/bin/bash sudo -u root s3fs test /mnt/share/ -o passwd_file=/root/.passwd-s3fs -o allow_other -o url=http://localhost:9000/ -o use_path_request_style exit 0
给它执行权限:
sudo chmod +x /usr/bin/aws_s3_fuse
编辑
/etc/fstab
添加这样一行,替换mount_point
):/usr/bin/aws_s3_fuse /mnt/share fuse allow_other,user,_netdev 0 0
使用系统
创建单元文件
sudo nano /etc/systemd/system/s3fs.service
(替换user_name
,bucket_name
,mount_point
,/path/to/.passwd-s3fs
):[Unit] Description=FUSE filesystem over AWS S3 bucket After=network.target [Service] Environment="MOUNT_POINT=/mnt/share" User=root Group=root ExecStart=s3fs cvat /mnt/share/ -o passwd_file=/root/.passwd-s3fs -o allow_other -o url=http://localhost:9000/ -o use_path_request_style -o umask=0000 -o endpoint=fr-par ExecStop=fusermount -u /mnt/share Restart=always Type=forking [Install] WantedBy=multi-user.target
更新系统配置,系统启动时启用unit autorun,挂载bucket:
sudo systemctl daemon-reload sudo systemctl enable s3fs.service sudo systemctl start s3fs.service # 卸载 $ fusermount -u /mnt/share/
查看
一个文件
/etc/mtab
包含当前挂载的文件系统的记录。cat /etc/mtab | grep 's3fs'