我正在创建本地标签工作室服务器来托管图像以注释我们的办公室。我希望数据库后端为后Ql而不是SQLITE,并且位于特定目录中,而不是默认值,而不是“ data-dir”。我有一台测试服务器在网络上使用各种机器在服务器上注释图像,但是后端是该测试的SQLITE。
我试图获得PostgreSQL后端数据库的所有内容都出于各种原因而失败。一些命令导致我所需目录中的SQLite DB(偶尔带有名称为“ Postgresql”);其他人则创建Postgres/pyscopg2错误,但我认为它们是一条花园路径。
主机运行Ubuntu 20.04 LTS。并使用其他API在网络上提供另一个PostgreSQL DB。 PostgreSQL版本运行为12.9。
我已经创建了一个Conda环境和PIP安装的标签工作室,如文档所建议。
这是我尝试的:
启动康达环境。遵循指令从在写作时是:
DJANGO_DB=default
POSTGRE_NAME=postgres
POSTGRE_USER=postgres
POSTGRE_PASSWORD=
POSTGRE_PORT=5432
POSTGRE_HOST=db
然后在开始命令上进行一些变体(我没有包含后斜切,只需在此处以可读性/可比性):
label-studio start --init \
-db postgresql \
--database /path/to/label-studio/databases/newdb \
--data-dir /path/to/label-studio/media_dirs/test_proj
结果:db是预期的,但是:
file newdb
给出“ newdb:sqlite 3.x数据库,最后使用SQLITE版本3038002”
label-studio start --init \
--database /path/to/label-studio/databases/newdb \
-db postgresql \
--data-dir /path/to/label-studio/media_dirs/test_proj
结果:指定路径的DB名为'PostgreSql',仍然是SQLite DB。这似乎反映了提到的错误,网址为: https://github.com/heartexlabs/labels/labels/labelellabel -Studio/esseage/1660
我还尝试了上述两个命令,其中省略了“ - int”参数,并以相同的结果为例。
然后,我尝试在上面相同链接的命令前面添加一些内容:
DJANGO_DB=default label-studio start \
--database /path/to/label-studio/databases/newdb \
--data-dir /path/to/label-studio/media_dirs/test_proj
结果:psycopg22.operationalerror:致命:密码身份验证因用户“ postgres”失败
致命:用户“ Postgres”结果的密码身份验证失败
DJANGO_DB=default POSTGRE_PASSWORD= label-studio start \
--database /path/to/label-studio/databases/newdb \
--data-dir /path/to/label-studio/media_dirs/test_proj
:PSYCOPG2.OperationalError:Fe_Sendauth:未提供密码的
任何帮助和分辨率将不胜感激。
另外,我不能用“ Label-studio”标记它,因为我不是完全 以创建一个新标签的声誉,因此,如果有人想这样做的人,请欣赏!
I am creating a local Label Studio server to host images to annotate in our office. I would like the database back end to be postgresql and not sqlite and be located in a particular directory, not the default and not the same as the 'data-dir'. I have got a test server working across the network with various machines annotating images on the server, but the backend was sqlite for this test.
Everything I've tried to get a postgresql backend db has failed for various reasons. Some commands result in a sqlite db (occasionally with the name 'postgresql') located in my required directory; others create postgres/pyscopg2 errors but I think they're up a garden path.
The host machine is running Ubuntu 20.04 LTS. And serves another postgresql db over the network using other APIs. Postgresql version running is 12.9.
I have created a conda environment and pip installed Label Studio as the documentation suggested.
Here's what I've tried:
Start the conda environment. Follow instructions to assign environment variables from https://labelstud.io/guide/storedata.html#PostgreSQL-database which at time of writing is:
DJANGO_DB=default
POSTGRE_NAME=postgres
POSTGRE_USER=postgres
POSTGRE_PASSWORD=
POSTGRE_PORT=5432
POSTGRE_HOST=db
Then a few variations on the start command (I didn't include the backslashes, just put here for readability/comparability):
label-studio start --init \
-db postgresql \
--database /path/to/label-studio/databases/newdb \
--data-dir /path/to/label-studio/media_dirs/test_proj
result: db is where expected, but:
file newdb
gives "newdb: SQLite 3.x database, last written using SQLite version 3038002"
label-studio start --init \
--database /path/to/label-studio/databases/newdb \
-db postgresql \
--data-dir /path/to/label-studio/media_dirs/test_proj
result: a db at specified path named 'postgresql' and still an sqlite db. This seems to mirror the mistake mentioned at: https://github.com/heartexlabs/label-studio/issues/1660
I have also tried the above two commands with the '--init' argument omitted with same results.
Then I tried adding something on the front of the command suggested at the same link above:
DJANGO_DB=default label-studio start \
--database /path/to/label-studio/databases/newdb \
--data-dir /path/to/label-studio/media_dirs/test_proj
result: psycopg2.OperationalError: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
DJANGO_DB=default POSTGRE_PASSWORD= label-studio start \
--database /path/to/label-studio/databases/newdb \
--data-dir /path/to/label-studio/media_dirs/test_proj
result: psycopg2.OperationalError: fe_sendauth: no password supplied
Any help and resolution would be highly appreciated.
Also, I can't tag this with 'label-studio' because I'm not quite at the required reputation to create a new tag, so if anyone who can feels like doing so, pleaseandthankyou!
发布评论
评论(1)
您的最后一个选择比所有其他选择都更接近。您是否尝试使用以下方式运行LS:
当然,您必须自己运行Postgres服务,正确配置它,创建db
< postgres_name>
,用户< postgres_user> 并设置密码
< password>
,授予此用户的访问权限。也不要忘记指定< db_host>
(localhost
?),< db_port>
(5432
?)Your last option was closer than all the others. Have you tried to run LS using this:
Sure, you have to run postgres service by yourself, configure it properly, create the DB
<postgres_name>
, the user<postgres_user>
and set the password<password>
, grant access rights to this user. Also don't forget to specify<db_host>
(localhost
?),<db_port>
(5432
?)