Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

源码安装启动不了服务 #110

Open
flinzhao opened this issue Jul 5, 2024 · 17 comments
Open

源码安装启动不了服务 #110

flinzhao opened this issue Jul 5, 2024 · 17 comments
Labels
enhancement New feature or request

Comments

@flinzhao
Copy link

flinzhao commented Jul 5, 2024

使用poetry install安装的,然后输入labelu --host=0.0.0.0 --port=8020,下面是日志。服务器IP是192.168.0.66,访问http://192.168.0.66:8020访问不了。。。
(labelu) [root@localhost labelU]# labelu --host=0.0.0.0 --port=8020
2024-07-05 15:18:47.416 | INFO | labelu.internal.common.config:Settings:22 - Database and media directory: /home/data/labelu-data/labelu
2024-07-05 15:18:47.717 | INFO | sqlalchemy.log:log:179 - BEGIN (implicit)
2024-07-05 15:18:47.717 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("user")
2024-07-05 15:18:47.717 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("user")
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task")
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task")
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.718 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_sample")
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_sample")
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_attachment")
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_attachment")
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_pre_annotation")
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.719 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_pre_annotation")
2024-07-05 15:18:47.720 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-05 15:18:47.720 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE user (
id INTEGER NOT NULL,
username VARCHAR,
hashed_password VARCHAR,
created_at DATETIME,
updated_at DATETIME,
PRIMARY KEY (id)
)

2024-07-05 15:18:47.720 | INFO | sqlalchemy.log:log:179 - [no key 0.00014s] ()
2024-07-05 15:18:47.723 | INFO | sqlalchemy.log:log:179 - CREATE UNIQUE INDEX ix_user_username ON user (username)
2024-07-05 15:18:47.723 | INFO | sqlalchemy.log:log:179 - [no key 0.00012s] ()
2024-07-05 15:18:47.725 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_user_id ON user (id)
2024-07-05 15:18:47.725 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-05 15:18:47.729 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task (
id INTEGER NOT NULL,
name VARCHAR(64),
description VARCHAR(1024),
tips VARCHAR(1024),
last_sample_inner_id INTEGER,
config TEXT,
media_type VARCHAR(32),
status VARCHAR(32),
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-05 15:18:47.729 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-05 15:18:47.733 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_id ON task (id)
2024-07-05 15:18:47.733 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-05 15:18:47.736 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_created_by ON task (created_by)
2024-07-05 15:18:47.736 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-05 15:18:47.739 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_deleted_at ON task (deleted_at)
2024-07-05 15:18:47.739 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-05 15:18:47.741 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_task_id_deleted_at_index ON task (id, deleted_at)
2024-07-05 15:18:47.741 | INFO | sqlalchemy.log:log:179 - [no key 0.00013s] ()
2024-07-05 15:18:47.743 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_name ON task (name)
2024-07-05 15:18:47.743 | INFO | sqlalchemy.log:log:179 - [no key 0.00015s] ()
2024-07-05 15:18:47.746 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task_attachment (
id INTEGER NOT NULL,
filename VARCHAR(256),
url VARCHAR(256),
path VARCHAR(256),
task_id INTEGER,
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES task (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-05 15:18:47.747 | INFO | sqlalchemy.log:log:179 - [no key 0.00040s] ()
2024-07-05 15:18:47.749 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_created_by ON task_attachment (created_by)
2024-07-05 15:18:47.750 | INFO | sqlalchemy.log:log:179 - [no key 0.00022s] ()
2024-07-05 15:18:47.752 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_id ON task_attachment (id)
2024-07-05 15:18:47.753 | INFO | sqlalchemy.log:log:179 - [no key 0.00036s] ()
2024-07-05 15:18:47.756 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_attachment_id_deleted_at ON task_attachment (id, deleted_at)
2024-07-05 15:18:47.756 | INFO | sqlalchemy.log:log:179 - [no key 0.00033s] ()
2024-07-05 15:18:47.759 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_deleted_at ON task_attachment (deleted_at)
2024-07-05 15:18:47.759 | INFO | sqlalchemy.log:log:179 - [no key 0.00044s] ()
2024-07-05 15:18:47.763 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_task_id ON task_attachment (task_id)
2024-07-05 15:18:47.763 | INFO | sqlalchemy.log:log:179 - [no key 0.00044s] ()
2024-07-05 15:18:47.767 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_updated_by ON task_attachment (updated_by)
2024-07-05 15:18:47.767 | INFO | sqlalchemy.log:log:179 - [no key 0.00044s] ()
2024-07-05 15:18:47.772 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task_sample (
id INTEGER NOT NULL,
inner_id INTEGER,
task_id INTEGER,
file_id INTEGER,
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
annotated_count INTEGER,
data TEXT,
state VARCHAR(32),
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES task (id),
FOREIGN KEY(file_id) REFERENCES task_attachment (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-05 15:18:47.773 | INFO | sqlalchemy.log:log:179 - [no key 0.00095s] ()
2024-07-05 15:18:47.776 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_id ON task_sample (id)
2024-07-05 15:18:47.776 | INFO | sqlalchemy.log:log:179 - [no key 0.00036s] ()
2024-07-05 15:18:47.779 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_file_id ON task_sample (file_id)
2024-07-05 15:18:47.779 | INFO | sqlalchemy.log:log:179 - [no key 0.00019s] ()
2024-07-05 15:18:47.781 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_task_id ON task_sample (task_id)
2024-07-05 15:18:47.781 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-05 15:18:47.784 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_deleted_at ON task_sample (deleted_at)
2024-07-05 15:18:47.784 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-05 15:18:47.786 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_created_by ON task_sample (created_by)
2024-07-05 15:18:47.786 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-05 15:18:47.788 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_sample_id_deleted_at ON task_sample (id, deleted_at)
2024-07-05 15:18:47.788 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-05 15:18:47.790 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task_pre_annotation (
id INTEGER NOT NULL,
task_id INTEGER,
file_id INTEGER,
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
data TEXT,
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES task (id),
FOREIGN KEY(file_id) REFERENCES task_attachment (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-05 15:18:47.790 | INFO | sqlalchemy.log:log:179 - [no key 0.00020s] ()
2024-07-05 15:18:47.792 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_deleted_at ON task_pre_annotation (deleted_at)
2024-07-05 15:18:47.792 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-05 15:18:47.795 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_pre_annotation_id_deleted_at ON task_pre_annotation (id, deleted_at)
2024-07-05 15:18:47.795 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-05 15:18:47.797 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_id ON task_pre_annotation (id)
2024-07-05 15:18:47.797 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-05 15:18:47.799 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_created_by ON task_pre_annotation (created_by)
2024-07-05 15:18:47.799 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-05 15:18:47.801 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_task_id ON task_pre_annotation (task_id)
2024-07-05 15:18:47.801 | INFO | sqlalchemy.log:log:179 - [no key 0.00012s] ()
2024-07-05 15:18:47.803 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_file_id ON task_pre_annotation (file_id)
2024-07-05 15:18:47.804 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-05 15:18:47.806 | INFO | sqlalchemy.log:log:179 - COMMIT
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 54fee6a7ecd8, init db
INFO [alembic.runtime.migration] Running upgrade 54fee6a7ecd8 -> e76c2ca5562e, add inner_id
INFO [alembic.runtime.migration] Running upgrade e76c2ca5562e -> 9d5da133bbe4, replace key with value in sample table and display unicode as the corresponding Chinese
INFO [alembic.runtime.migration] Running upgrade 9d5da133bbe4 -> 363f9eea797e, Change tool config format
INFO [alembic.runtime.migration] Running upgrade 363f9eea797e -> 0145db0fec34, Change Result format
INFO [alembic.runtime.migration] Running upgrade 0145db0fec34 -> 1b174ca5159a, update pointList => points
INFO [alembic.runtime.migration] Running upgrade 1b174ca5159a -> bc8fcb35b66b, add file and pre_annotation

@flinzhao
Copy link
Author

flinzhao commented Jul 5, 2024

image
image
image
image
当我使用docker启动的时候也出现类似的问题

@gary-Shen
Copy link
Collaborator

可以列一下你源码安装的步骤吗?

@flinzhao
Copy link
Author

flinzhao commented Jul 5, 2024

image
这是pyproject.toml文件
image
这是我修改的数据存储路径
之后进入labelU根目录执行

conda create -n labelu python=3.7
conda activate labelu
pip install poetry
poetry install 
labelu --host=0.0.0.0 --port=8020

@gary-Shen
Copy link
Collaborator

是不是修改后的目录有读写权限问题?

@gary-Shen
Copy link
Collaborator

看日志是没甚么异常,只是没显示server ready的状态。

@flinzhao
Copy link
Author

flinzhao commented Jul 5, 2024

image
使用chmod 777 labelu-data/赋予读写权限后,还是访问不了http://192.168.0.66:8020

@flinzhao
Copy link
Author

flinzhao commented Jul 5, 2024

我才用源码安装的方式主要是我的系统盘占用99%,想要将labelu的数据保存在数据盘,所以想要指定保存路径😂如果使用pip install 安装,labelu --data_dir=xxx,这种方式就好了🤣

@gary-Shen gary-Shen added the enhancement New feature or request label Jul 5, 2024
@gary-Shen
Copy link
Collaborator

image 这是pyproject.toml文件 image 这是我修改的数据存储路径 之后进入labelU根目录执行

conda create -n labelu python=3.7
conda activate labelu
pip install poetry
poetry install 
labelu --host=0.0.0.0 --port=8020

我们尝试复现一下

@flinzhao
Copy link
Author

flinzhao commented Jul 8, 2024

(labelu-env) [root@localhost labelU]# pip install labelu --proxy=http://192.168.0.237:7890
Collecting labelu
Downloading labelu-1.0.5-py3-none-any.whl (2.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 4.2 MB/s eta 0:00:00
Collecting typer[all]<0.8.0,>=0.7.0
Downloading typer-0.7.0-py3-none-any.whl (38 kB)
Collecting fastapi<0.87.0,>=0.86.0
Using cached fastapi-0.86.0-py3-none-any.whl (55 kB)
Collecting python-dotenv<0.22.0,>=0.21.0
Downloading python_dotenv-0.21.1-py3-none-any.whl (19 kB)
Collecting pillow<10.0.0,>=9.3.0
Downloading Pillow-9.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 13.0 MB/s eta 0:00:00
Collecting loguru<0.7.0,>=0.6.0
Using cached loguru-0.6.0-py3-none-any.whl (58 kB)
Collecting python-multipart<0.0.6,>=0.0.5
Downloading python-multipart-0.0.5.tar.gz (32 kB)
Preparing metadata (setup.py) ... done
Collecting aiofiles<23.0.0,>=22.1.0
Downloading aiofiles-22.1.0-py3-none-any.whl (14 kB)
Collecting appdirs<2.0.0,>=1.4.4
Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting passlib[bcrypt]<2.0.0,>=1.7.4
Downloading passlib-1.7.4-py2.py3-none-any.whl (525 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 525.6/525.6 kB 16.6 MB/s eta 0:00:00
Collecting uvicorn<0.20.0,>=0.19.0
Downloading uvicorn-0.19.0-py3-none-any.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.6/56.6 kB 29.5 MB/s eta 0:00:00
Collecting python-jose[cryptography]<4.0.0,>=3.3.0
Downloading python_jose-3.3.0-py2.py3-none-any.whl (33 kB)
Collecting sqlalchemy<2.0.0,>=1.4.43
Using cached SQLAlchemy-1.4.52-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
Collecting alembic<2.0.0,>=1.9.4
Downloading alembic-1.12.1-py3-none-any.whl (226 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 226.8/226.8 kB 14.7 MB/s eta 0:00:00
Collecting email-validator<2.0.0,>=1.3.0
Downloading email_validator-1.3.1-py2.py3-none-any.whl (22 kB)
Collecting importlib-resources
Using cached importlib_resources-5.12.0-py3-none-any.whl (36 kB)
Collecting typing-extensions>=4
Using cached typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Collecting Mako
Downloading Mako-1.2.4-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.7/78.7 kB 24.0 MB/s eta 0:00:00
Collecting importlib-metadata
Using cached importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Collecting idna>=2.0.0
Using cached idna-3.7-py3-none-any.whl (66 kB)
Collecting dnspython>=1.15.0
Downloading dnspython-2.3.0-py3-none-any.whl (283 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.7/283.7 kB 13.9 MB/s eta 0:00:00
Collecting pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2
Using cached pydantic-1.10.17-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting starlette==0.20.4
Using cached starlette-0.20.4-py3-none-any.whl (63 kB)
Collecting anyio<5,>=3.4.0
Using cached anyio-3.7.1-py3-none-any.whl (80 kB)
Collecting bcrypt>=3.1.0
Downloading bcrypt-4.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.4/283.4 kB 16.7 MB/s eta 0:00:00
Collecting pyasn1
Downloading pyasn1-0.5.1-py2.py3-none-any.whl (84 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.9/84.9 kB 17.8 MB/s eta 0:00:00
Collecting ecdsa!=0.15
Downloading ecdsa-0.19.0-py2.py3-none-any.whl (149 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.3/149.3 kB 26.8 MB/s eta 0:00:00
Collecting rsa
Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting cryptography>=3.4.0
Using cached cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB)
Collecting six>=1.4.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting greenlet!=0.4.17
Using cached greenlet-3.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (622 kB)
Collecting click<9.0.0,>=7.1.1
Downloading click-8.1.7-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 27.3 MB/s eta 0:00:00
Collecting rich<13.0.0,>=10.11.0
Downloading rich-12.6.0-py3-none-any.whl (237 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 237.5/237.5 kB 10.6 MB/s eta 0:00:00
Collecting shellingham<2.0.0,>=1.3.0
Using cached shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Collecting colorama<0.5.0,>=0.4.3
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting h11>=0.8
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 29.2 MB/s eta 0:00:00
Collecting cffi>=1.12
Using cached cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (427 kB)
Collecting commonmark<0.10.0,>=0.9.0
Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 26.0 MB/s eta 0:00:00
Collecting pygments<3.0.0,>=2.6.0
Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 22.6 MB/s eta 0:00:00
Collecting zipp>=0.5
Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB)
Collecting MarkupSafe>=0.9.2
Downloading MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting sniffio>=1.1
Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
Collecting exceptiongroup
Using cached exceptiongroup-1.2.1-py3-none-any.whl (16 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Building wheels for collected packages: python-multipart
Building wheel for python-multipart (setup.py) ... done
Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31670 sha256=e31bad8b9a529e0e545a8a003ab0039191ebbc44aa421c0a6de92ede20d6b56c
Stored in directory: /root/.cache/pip/wheels/7b/24/20/55941b99a69639d6e3a3bce7d2d7b6a2d633f05125042a544a
Successfully built python-multipart
Installing collected packages: passlib, commonmark, appdirs, zipp, typing-extensions, sniffio, six, shellingham, python-dotenv, pygments, pycparser, pyasn1, pillow, MarkupSafe, loguru, idna, greenlet, exceptiongroup, dnspython, colorama, bcrypt, aiofiles, rsa, rich, python-multipart, pydantic, importlib-resources, importlib-metadata, h11, email-validator, ecdsa, cffi, anyio, starlette, sqlalchemy, python-jose, Mako, cryptography, click, uvicorn, typer, fastapi, alembic, labelu
Successfully installed Mako-1.2.4 MarkupSafe-2.1.5 aiofiles-22.1.0 alembic-1.12.1 anyio-3.7.1 appdirs-1.4.4 bcrypt-4.1.3 cffi-1.15.1 click-8.1.7 colorama-0.4.6 commonmark-0.9.1 cryptography-42.0.8 dnspython-2.3.0 ecdsa-0.19.0 email-validator-1.3.1 exceptiongroup-1.2.1 fastapi-0.86.0 greenlet-3.0.3 h11-0.14.0 idna-3.7 importlib-metadata-6.7.0 importlib-resources-5.12.0 labelu-1.0.5 loguru-0.6.0 passlib-1.7.4 pillow-9.5.0 pyasn1-0.5.1 pycparser-2.21 pydantic-1.10.17 pygments-2.17.2 python-dotenv-0.21.1 python-jose-3.3.0 python-multipart-0.0.5 rich-12.6.0 rsa-4.9 shellingham-1.5.4 six-1.16.0 sniffio-1.3.1 sqlalchemy-1.4.52 starlette-0.20.4 typer-0.7.0 typing-extensions-4.7.1 uvicorn-0.19.0 zipp-3.15.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
(labelu-env) [root@localhost labelU]# labelu
2024-07-08 09:34:28.972 | INFO | labelu.internal.common.config:Settings:22 - Database and media directory: /root/.local/share/labelu
2024-07-08 09:34:29.304 | INFO | sqlalchemy.log:log:179 - BEGIN (implicit)
2024-07-08 09:34:29.305 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("user")
2024-07-08 09:34:29.305 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("user")
2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task")
2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task")
2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_sample")
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_sample")
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_attachment")
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_attachment")
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_pre_annotation")
2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.308 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_pre_annotation")
2024-07-08 09:34:29.308 | INFO | sqlalchemy.log:log:179 - [raw sql] ()
2024-07-08 09:34:29.309 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE user (
id INTEGER NOT NULL,
username VARCHAR,
hashed_password VARCHAR,
created_at DATETIME,
updated_at DATETIME,
PRIMARY KEY (id)
)

2024-07-08 09:34:29.309 | INFO | sqlalchemy.log:log:179 - [no key 0.00015s] ()
2024-07-08 09:34:29.315 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_user_id ON user (id)
2024-07-08 09:34:29.316 | INFO | sqlalchemy.log:log:179 - [no key 0.00012s] ()
2024-07-08 09:34:29.318 | INFO | sqlalchemy.log:log:179 - CREATE UNIQUE INDEX ix_user_username ON user (username)
2024-07-08 09:34:29.318 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-08 09:34:29.320 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task (
id INTEGER NOT NULL,
name VARCHAR(64),
description VARCHAR(1024),
tips VARCHAR(1024),
last_sample_inner_id INTEGER,
config TEXT,
media_type VARCHAR(32),
status VARCHAR(32),
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-08 09:34:29.320 | INFO | sqlalchemy.log:log:179 - [no key 0.00018s] ()
2024-07-08 09:34:29.322 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_name ON task (name)
2024-07-08 09:34:29.322 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.324 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_created_by ON task (created_by)
2024-07-08 09:34:29.325 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.326 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_deleted_at ON task (deleted_at)
2024-07-08 09:34:29.327 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.329 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_id ON task (id)
2024-07-08 09:34:29.329 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.331 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_task_id_deleted_at_index ON task (id, deleted_at)
2024-07-08 09:34:29.331 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.333 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task_attachment (
id INTEGER NOT NULL,
filename VARCHAR(256),
url VARCHAR(256),
path VARCHAR(256),
task_id INTEGER,
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES task (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-08 09:34:29.333 | INFO | sqlalchemy.log:log:179 - [no key 0.00018s] ()
2024-07-08 09:34:29.335 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_updated_by ON task_attachment (updated_by)
2024-07-08 09:34:29.336 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.337 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_created_by ON task_attachment (created_by)
2024-07-08 09:34:29.338 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.340 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_attachment_id_deleted_at ON task_attachment (id, deleted_at)
2024-07-08 09:34:29.340 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.342 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_id ON task_attachment (id)
2024-07-08 09:34:29.342 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.344 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_deleted_at ON task_attachment (deleted_at)
2024-07-08 09:34:29.344 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-08 09:34:29.346 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_task_id ON task_attachment (task_id)
2024-07-08 09:34:29.346 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.348 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task_sample (
id INTEGER NOT NULL,
inner_id INTEGER,
task_id INTEGER,
file_id INTEGER,
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
annotated_count INTEGER,
data TEXT,
state VARCHAR(32),
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES task (id),
FOREIGN KEY(file_id) REFERENCES task_attachment (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-08 09:34:29.348 | INFO | sqlalchemy.log:log:179 - [no key 0.00020s] ()
2024-07-08 09:34:29.351 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_sample_id_deleted_at ON task_sample (id, deleted_at)
2024-07-08 09:34:29.351 | INFO | sqlalchemy.log:log:179 - [no key 0.00012s] ()
2024-07-08 09:34:29.356 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_id ON task_sample (id)
2024-07-08 09:34:29.356 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] ()
2024-07-08 09:34:29.358 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_created_by ON task_sample (created_by)
2024-07-08 09:34:29.358 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.360 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_deleted_at ON task_sample (deleted_at)
2024-07-08 09:34:29.360 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.363 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_task_id ON task_sample (task_id)
2024-07-08 09:34:29.363 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.365 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_file_id ON task_sample (file_id)
2024-07-08 09:34:29.365 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.367 | INFO | sqlalchemy.log:log:179 -
CREATE TABLE task_pre_annotation (
id INTEGER NOT NULL,
task_id INTEGER,
file_id INTEGER,
created_by INTEGER,
updated_by INTEGER,
created_at DATETIME,
updated_at DATETIME,
data TEXT,
deleted_at DATETIME,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES task (id),
FOREIGN KEY(file_id) REFERENCES task_attachment (id),
FOREIGN KEY(created_by) REFERENCES user (id),
FOREIGN KEY(updated_by) REFERENCES user (id)
)

2024-07-08 09:34:29.367 | INFO | sqlalchemy.log:log:179 - [no key 0.00016s] ()
2024-07-08 09:34:29.369 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_file_id ON task_pre_annotation (file_id)
2024-07-08 09:34:29.369 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.371 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_deleted_at ON task_pre_annotation (deleted_at)
2024-07-08 09:34:29.371 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-08 09:34:29.373 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_pre_annotation_id_deleted_at ON task_pre_annotation (id, deleted_at)
2024-07-08 09:34:29.374 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.375 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_id ON task_pre_annotation (id)
2024-07-08 09:34:29.376 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] ()
2024-07-08 09:34:29.378 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_created_by ON task_pre_annotation (created_by)
2024-07-08 09:34:29.378 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.380 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_task_id ON task_pre_annotation (task_id)
2024-07-08 09:34:29.380 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] ()
2024-07-08 09:34:29.382 | INFO | sqlalchemy.log:log:179 - COMMIT
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 54fee6a7ecd8, init db
INFO [alembic.runtime.migration] Running upgrade 54fee6a7ecd8 -> e76c2ca5562e, add inner_id
INFO [alembic.runtime.migration] Running upgrade e76c2ca5562e -> 9d5da133bbe4, replace key with value in sample table and display unicode as the corresponding Chinese
INFO [alembic.runtime.migration] Running upgrade 9d5da133bbe4 -> 363f9eea797e, Change tool config format
INFO [alembic.runtime.migration] Running upgrade 363f9eea797e -> 0145db0fec34, Change Result format
INFO [alembic.runtime.migration] Running upgrade 0145db0fec34 -> 1b174ca5159a, update pointList => points
INFO [alembic.runtime.migration] Running upgrade 1b174ca5159a -> bc8fcb35b66b, add file and pre_annotation
现在是不支持linux系统下部署labelu吗。。。,为什么pip安装也会这样

@gary-Shen
Copy link
Collaborator

支持的,这个问题以前没出现过。我排查一下。

@gary-Shen
Copy link
Collaborator

(labelu-env) [root@localhost labelU]# pip install labelu --proxy=http://192.168.0.237:7890 Collecting labelu Downloading labelu-1.0.5-py3-none-any.whl (2.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 4.2 MB/s eta 0:00:00 Collecting typer[all]<0.8.0,>=0.7.0 Downloading typer-0.7.0-py3-none-any.whl (38 kB) Collecting fastapi<0.87.0,>=0.86.0 Using cached fastapi-0.86.0-py3-none-any.whl (55 kB) Collecting python-dotenv<0.22.0,>=0.21.0 Downloading python_dotenv-0.21.1-py3-none-any.whl (19 kB) Collecting pillow<10.0.0,>=9.3.0 Downloading Pillow-9.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 13.0 MB/s eta 0:00:00 Collecting loguru<0.7.0,>=0.6.0 Using cached loguru-0.6.0-py3-none-any.whl (58 kB) Collecting python-multipart<0.0.6,>=0.0.5 Downloading python-multipart-0.0.5.tar.gz (32 kB) Preparing metadata (setup.py) ... done Collecting aiofiles<23.0.0,>=22.1.0 Downloading aiofiles-22.1.0-py3-none-any.whl (14 kB) Collecting appdirs<2.0.0,>=1.4.4 Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Collecting passlib[bcrypt]<2.0.0,>=1.7.4 Downloading passlib-1.7.4-py2.py3-none-any.whl (525 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 525.6/525.6 kB 16.6 MB/s eta 0:00:00 Collecting uvicorn<0.20.0,>=0.19.0 Downloading uvicorn-0.19.0-py3-none-any.whl (56 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.6/56.6 kB 29.5 MB/s eta 0:00:00 Collecting python-jose[cryptography]<4.0.0,>=3.3.0 Downloading python_jose-3.3.0-py2.py3-none-any.whl (33 kB) Collecting sqlalchemy<2.0.0,>=1.4.43 Using cached SQLAlchemy-1.4.52-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB) Collecting alembic<2.0.0,>=1.9.4 Downloading alembic-1.12.1-py3-none-any.whl (226 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 226.8/226.8 kB 14.7 MB/s eta 0:00:00 Collecting email-validator<2.0.0,>=1.3.0 Downloading email_validator-1.3.1-py2.py3-none-any.whl (22 kB) Collecting importlib-resources Using cached importlib_resources-5.12.0-py3-none-any.whl (36 kB) Collecting typing-extensions>=4 Using cached typing_extensions-4.7.1-py3-none-any.whl (33 kB) Collecting Mako Downloading Mako-1.2.4-py3-none-any.whl (78 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.7/78.7 kB 24.0 MB/s eta 0:00:00 Collecting importlib-metadata Using cached importlib_metadata-6.7.0-py3-none-any.whl (22 kB) Collecting idna>=2.0.0 Using cached idna-3.7-py3-none-any.whl (66 kB) Collecting dnspython>=1.15.0 Downloading dnspython-2.3.0-py3-none-any.whl (283 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.7/283.7 kB 13.9 MB/s eta 0:00:00 Collecting pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 Using cached pydantic-1.10.17-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB) Collecting starlette==0.20.4 Using cached starlette-0.20.4-py3-none-any.whl (63 kB) Collecting anyio<5,>=3.4.0 Using cached anyio-3.7.1-py3-none-any.whl (80 kB) Collecting bcrypt>=3.1.0 Downloading bcrypt-4.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.4/283.4 kB 16.7 MB/s eta 0:00:00 Collecting pyasn1 Downloading pyasn1-0.5.1-py2.py3-none-any.whl (84 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.9/84.9 kB 17.8 MB/s eta 0:00:00 Collecting ecdsa!=0.15 Downloading ecdsa-0.19.0-py2.py3-none-any.whl (149 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.3/149.3 kB 26.8 MB/s eta 0:00:00 Collecting rsa Downloading rsa-4.9-py3-none-any.whl (34 kB) Collecting cryptography>=3.4.0 Using cached cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB) Collecting six>=1.4.0 Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting greenlet!=0.4.17 Using cached greenlet-3.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (622 kB) Collecting click<9.0.0,>=7.1.1 Downloading click-8.1.7-py3-none-any.whl (97 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 27.3 MB/s eta 0:00:00 Collecting rich<13.0.0,>=10.11.0 Downloading rich-12.6.0-py3-none-any.whl (237 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 237.5/237.5 kB 10.6 MB/s eta 0:00:00 Collecting shellingham<2.0.0,>=1.3.0 Using cached shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB) Collecting colorama<0.5.0,>=0.4.3 Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB) Collecting h11>=0.8 Downloading h11-0.14.0-py3-none-any.whl (58 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 29.2 MB/s eta 0:00:00 Collecting cffi>=1.12 Using cached cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (427 kB) Collecting commonmark<0.10.0,>=0.9.0 Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 26.0 MB/s eta 0:00:00 Collecting pygments<3.0.0,>=2.6.0 Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 22.6 MB/s eta 0:00:00 Collecting zipp>=0.5 Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB) Collecting MarkupSafe>=0.9.2 Downloading MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB) Collecting sniffio>=1.1 Using cached sniffio-1.3.1-py3-none-any.whl (10 kB) Collecting exceptiongroup Using cached exceptiongroup-1.2.1-py3-none-any.whl (16 kB) Collecting pycparser Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Building wheels for collected packages: python-multipart Building wheel for python-multipart (setup.py) ... done Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31670 sha256=e31bad8b9a529e0e545a8a003ab0039191ebbc44aa421c0a6de92ede20d6b56c Stored in directory: /root/.cache/pip/wheels/7b/24/20/55941b99a69639d6e3a3bce7d2d7b6a2d633f05125042a544a Successfully built python-multipart Installing collected packages: passlib, commonmark, appdirs, zipp, typing-extensions, sniffio, six, shellingham, python-dotenv, pygments, pycparser, pyasn1, pillow, MarkupSafe, loguru, idna, greenlet, exceptiongroup, dnspython, colorama, bcrypt, aiofiles, rsa, rich, python-multipart, pydantic, importlib-resources, importlib-metadata, h11, email-validator, ecdsa, cffi, anyio, starlette, sqlalchemy, python-jose, Mako, cryptography, click, uvicorn, typer, fastapi, alembic, labelu Successfully installed Mako-1.2.4 MarkupSafe-2.1.5 aiofiles-22.1.0 alembic-1.12.1 anyio-3.7.1 appdirs-1.4.4 bcrypt-4.1.3 cffi-1.15.1 click-8.1.7 colorama-0.4.6 commonmark-0.9.1 cryptography-42.0.8 dnspython-2.3.0 ecdsa-0.19.0 email-validator-1.3.1 exceptiongroup-1.2.1 fastapi-0.86.0 greenlet-3.0.3 h11-0.14.0 idna-3.7 importlib-metadata-6.7.0 importlib-resources-5.12.0 labelu-1.0.5 loguru-0.6.0 passlib-1.7.4 pillow-9.5.0 pyasn1-0.5.1 pycparser-2.21 pydantic-1.10.17 pygments-2.17.2 python-dotenv-0.21.1 python-jose-3.3.0 python-multipart-0.0.5 rich-12.6.0 rsa-4.9 shellingham-1.5.4 six-1.16.0 sniffio-1.3.1 sqlalchemy-1.4.52 starlette-0.20.4 typer-0.7.0 typing-extensions-4.7.1 uvicorn-0.19.0 zipp-3.15.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv (labelu-env) [root@localhost labelU]# labelu 2024-07-08 09:34:28.972 | INFO | labelu.internal.common.config:Settings:22 - Database and media directory: /root/.local/share/labelu 2024-07-08 09:34:29.304 | INFO | sqlalchemy.log:log:179 - BEGIN (implicit) 2024-07-08 09:34:29.305 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("user") 2024-07-08 09:34:29.305 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("user") 2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task") 2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task") 2024-07-08 09:34:29.306 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_sample") 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_sample") 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_attachment") 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_attachment") 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - PRAGMA main.table_info("task_pre_annotation") 2024-07-08 09:34:29.307 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.308 | INFO | sqlalchemy.log:log:179 - PRAGMA temp.table_info("task_pre_annotation") 2024-07-08 09:34:29.308 | INFO | sqlalchemy.log:log:179 - [raw sql] () 2024-07-08 09:34:29.309 | INFO | sqlalchemy.log:log:179 - CREATE TABLE user ( id INTEGER NOT NULL, username VARCHAR, hashed_password VARCHAR, created_at DATETIME, updated_at DATETIME, PRIMARY KEY (id) )

2024-07-08 09:34:29.309 | INFO | sqlalchemy.log:log:179 - [no key 0.00015s] () 2024-07-08 09:34:29.315 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_user_id ON user (id) 2024-07-08 09:34:29.316 | INFO | sqlalchemy.log:log:179 - [no key 0.00012s] () 2024-07-08 09:34:29.318 | INFO | sqlalchemy.log:log:179 - CREATE UNIQUE INDEX ix_user_username ON user (username) 2024-07-08 09:34:29.318 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] () 2024-07-08 09:34:29.320 | INFO | sqlalchemy.log:log:179 - CREATE TABLE task ( id INTEGER NOT NULL, name VARCHAR(64), description VARCHAR(1024), tips VARCHAR(1024), last_sample_inner_id INTEGER, config TEXT, media_type VARCHAR(32), status VARCHAR(32), created_by INTEGER, updated_by INTEGER, created_at DATETIME, updated_at DATETIME, deleted_at DATETIME, PRIMARY KEY (id), FOREIGN KEY(created_by) REFERENCES user (id), FOREIGN KEY(updated_by) REFERENCES user (id) )

2024-07-08 09:34:29.320 | INFO | sqlalchemy.log:log:179 - [no key 0.00018s] () 2024-07-08 09:34:29.322 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_name ON task (name) 2024-07-08 09:34:29.322 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.324 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_created_by ON task (created_by) 2024-07-08 09:34:29.325 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.326 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_deleted_at ON task (deleted_at) 2024-07-08 09:34:29.327 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.329 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_id ON task (id) 2024-07-08 09:34:29.329 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.331 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_task_id_deleted_at_index ON task (id, deleted_at) 2024-07-08 09:34:29.331 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.333 | INFO | sqlalchemy.log:log:179 - CREATE TABLE task_attachment ( id INTEGER NOT NULL, filename VARCHAR(256), url VARCHAR(256), path VARCHAR(256), task_id INTEGER, created_by INTEGER, updated_by INTEGER, created_at DATETIME, updated_at DATETIME, deleted_at DATETIME, PRIMARY KEY (id), FOREIGN KEY(task_id) REFERENCES task (id), FOREIGN KEY(created_by) REFERENCES user (id), FOREIGN KEY(updated_by) REFERENCES user (id) )

2024-07-08 09:34:29.333 | INFO | sqlalchemy.log:log:179 - [no key 0.00018s] () 2024-07-08 09:34:29.335 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_updated_by ON task_attachment (updated_by) 2024-07-08 09:34:29.336 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.337 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_created_by ON task_attachment (created_by) 2024-07-08 09:34:29.338 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.340 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_attachment_id_deleted_at ON task_attachment (id, deleted_at) 2024-07-08 09:34:29.340 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.342 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_id ON task_attachment (id) 2024-07-08 09:34:29.342 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.344 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_deleted_at ON task_attachment (deleted_at) 2024-07-08 09:34:29.344 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] () 2024-07-08 09:34:29.346 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_attachment_task_id ON task_attachment (task_id) 2024-07-08 09:34:29.346 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.348 | INFO | sqlalchemy.log:log:179 - CREATE TABLE task_sample ( id INTEGER NOT NULL, inner_id INTEGER, task_id INTEGER, file_id INTEGER, created_by INTEGER, updated_by INTEGER, created_at DATETIME, updated_at DATETIME, annotated_count INTEGER, data TEXT, state VARCHAR(32), deleted_at DATETIME, PRIMARY KEY (id), FOREIGN KEY(task_id) REFERENCES task (id), FOREIGN KEY(file_id) REFERENCES task_attachment (id), FOREIGN KEY(created_by) REFERENCES user (id), FOREIGN KEY(updated_by) REFERENCES user (id) )

2024-07-08 09:34:29.348 | INFO | sqlalchemy.log:log:179 - [no key 0.00020s] () 2024-07-08 09:34:29.351 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_sample_id_deleted_at ON task_sample (id, deleted_at) 2024-07-08 09:34:29.351 | INFO | sqlalchemy.log:log:179 - [no key 0.00012s] () 2024-07-08 09:34:29.356 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_id ON task_sample (id) 2024-07-08 09:34:29.356 | INFO | sqlalchemy.log:log:179 - [no key 0.00011s] () 2024-07-08 09:34:29.358 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_created_by ON task_sample (created_by) 2024-07-08 09:34:29.358 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.360 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_deleted_at ON task_sample (deleted_at) 2024-07-08 09:34:29.360 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.363 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_task_id ON task_sample (task_id) 2024-07-08 09:34:29.363 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.365 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_sample_file_id ON task_sample (file_id) 2024-07-08 09:34:29.365 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.367 | INFO | sqlalchemy.log:log:179 - CREATE TABLE task_pre_annotation ( id INTEGER NOT NULL, task_id INTEGER, file_id INTEGER, created_by INTEGER, updated_by INTEGER, created_at DATETIME, updated_at DATETIME, data TEXT, deleted_at DATETIME, PRIMARY KEY (id), FOREIGN KEY(task_id) REFERENCES task (id), FOREIGN KEY(file_id) REFERENCES task_attachment (id), FOREIGN KEY(created_by) REFERENCES user (id), FOREIGN KEY(updated_by) REFERENCES user (id) )

2024-07-08 09:34:29.367 | INFO | sqlalchemy.log:log:179 - [no key 0.00016s] () 2024-07-08 09:34:29.369 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_file_id ON task_pre_annotation (file_id) 2024-07-08 09:34:29.369 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.371 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_deleted_at ON task_pre_annotation (deleted_at) 2024-07-08 09:34:29.371 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] () 2024-07-08 09:34:29.373 | INFO | sqlalchemy.log:log:179 - CREATE INDEX idx_pre_annotation_id_deleted_at ON task_pre_annotation (id, deleted_at) 2024-07-08 09:34:29.374 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.375 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_id ON task_pre_annotation (id) 2024-07-08 09:34:29.376 | INFO | sqlalchemy.log:log:179 - [no key 0.00009s] () 2024-07-08 09:34:29.378 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_created_by ON task_pre_annotation (created_by) 2024-07-08 09:34:29.378 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.380 | INFO | sqlalchemy.log:log:179 - CREATE INDEX ix_task_pre_annotation_task_id ON task_pre_annotation (task_id) 2024-07-08 09:34:29.380 | INFO | sqlalchemy.log:log:179 - [no key 0.00010s] () 2024-07-08 09:34:29.382 | INFO | sqlalchemy.log:log:179 - COMMIT INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. INFO [alembic.runtime.migration] Running upgrade -> 54fee6a7ecd8, init db INFO [alembic.runtime.migration] Running upgrade 54fee6a7ecd8 -> e76c2ca5562e, add inner_id INFO [alembic.runtime.migration] Running upgrade e76c2ca5562e -> 9d5da133bbe4, replace key with value in sample table and display unicode as the corresponding Chinese INFO [alembic.runtime.migration] Running upgrade 9d5da133bbe4 -> 363f9eea797e, Change tool config format INFO [alembic.runtime.migration] Running upgrade 363f9eea797e -> 0145db0fec34, Change Result format INFO [alembic.runtime.migration] Running upgrade 0145db0fec34 -> 1b174ca5159a, update pointList => points INFO [alembic.runtime.migration] Running upgrade 1b174ca5159a -> bc8fcb35b66b, add file and pre_annotation 现在是不支持linux系统下部署labelu吗。。。,为什么pip安装也会这样

用 python 3.11 试一下?linux 第一次安装使用 3.7 复现了这个问题。

@n2lzxcstars
Copy link

linux环境peotry install安装部署遇到同样的问题,使用”nohup uvicorn labelu.main:app --reload --port 30036 > labelu.log 2>&1 &“启动:
image

运行日志log卡住:
image

通过”alembic history“发现是数据迁移的问题:
image
应该如何解决

@gary-Shen
Copy link
Collaborator

是python 3.11吗?

@n2lzxcstars
Copy link

是python 3.11吗?

是的
image

@gary-Shen
Copy link
Collaborator

linux环境peotry install安装部署遇到同样的问题,使用”nohup uvicorn labelu.main:app --reload --port 30036 > labelu.log 2>&1 &“启动: image ; 运行日志log卡住: image ; 通过”alembic history“发现是数据迁移的问题: image 应该如何解决

首先你这个提示,alembic 命令应该在 alembic_labelu 目录执行,这个目录才有alembic.ini 配置文件。

另外这个卡住的情况稍等我排查看看。

@n2lzxcstars
Copy link

n2lzxcstars commented Aug 9, 2024

linux环境peotry install安装部署遇到同样的问题,使用”nohup uvicorn labelu.main:app --reload --port 30036 > labelu.log 2>&1 &“启动: image ; 运行日志log卡住: image ; 通过”alembic history“发现是数据迁移的问题: image 应该如何解决

首先你这个提示,alembic 命令应该在 alembic_labelu 目录执行,这个目录才有alembic.ini 配置文件。

另外这个卡住的情况稍等我排查看看。

好的,感谢解答!根据您的建议,切换到指定目录执行后,结果如下:
image
尝试手动迁移更新时报错,"Could not parse SQLAlchemy URL from string '' ":
image

@gary-Shen
Copy link
Collaborator

linux环境peotry install安装部署遇到同样的问题,使用”nohup uvicorn labelu.main:app --reload --port 30036 > labelu.log 2>&1 &“启动: image ; 运行日志log卡住: image ; 通过”alembic history“发现是数据迁移的问题: image 应该如何解决

首先你这个提示,alembic 命令应该在 alembic_labelu 目录执行,这个目录才有alembic.ini 配置文件。

另外这个卡住的情况稍等我排查看看。

新 ubuntu 20 上没有复现这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants