{"id":16486133,"url":"https://github.com/lhr0909/lipstick-db","last_synced_at":"2025-08-26T12:07:48.863Z","repository":{"id":37823015,"uuid":"501094270","full_name":"lhr0909/lipstick-db","owner":"lhr0909","description":"聪明的AI口红数据库 Smart AI Lipstick Database 💄","archived":false,"fork":false,"pushed_at":"2022-08-03T12:21:41.000Z","size":5128,"stargazers_count":81,"open_issues_count":3,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T23:51:33.079Z","etag":null,"topics":["database","jina","lipstick","neural-search","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lhr0909.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-08T04:03:56.000Z","updated_at":"2025-01-30T01:40:40.000Z","dependencies_parsed_at":"2022-07-12T16:54:40.385Z","dependency_job_id":null,"html_url":"https://github.com/lhr0909/lipstick-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lhr0909/lipstick-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhr0909%2Flipstick-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhr0909%2Flipstick-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhr0909%2Flipstick-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhr0909%2Flipstick-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lhr0909","download_url":"https://codeload.github.com/lhr0909/lipstick-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhr0909%2Flipstick-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272219189,"owners_count":24894369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","jina","lipstick","neural-search","python"],"created_at":"2024-10-11T13:28:27.102Z","updated_at":"2025-08-26T12:07:48.831Z","avatar_url":"https://github.com/lhr0909.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 口红搜索引擎 Lipstick DB\n\n用AI搜索口红！Find the right lipstick using AI!\n\n[English Documentation](./README_en.md)\n\n[Bilibili](https://www.bilibili.com/video/BV1tT41137UT)\n\n[点击这里试一试](https://lipstick-db.senses.chat/)\n\n# 本地开发步骤\n\n## 系统依赖\n\n系统需要安装Docker桌面版，我们需要通过docker运行minio才能正常在本地工作，如果没有Docker的话，需要到AWS上申请S3或者到腾讯云申请COS服务。\n\nPython最低版本3.8+, 推荐3.9+（建议使用pyenv管理Python环境）\n\n前端项目需要安装NodeJS v14+（推荐v16 LTS）和yarn v1，推荐使用nvm管理NodeJS环境\n\n另外推荐安装make，因为项目使用了make配置环境变量注入\n\n## docker依赖\n\n运行以下命令启动minio服务：\n\n```\ndocker compose up -d minio-service\n```\n\n本地启动之后，进入http://localhost:9001，输入用户名minio，密码minio123进入之后，到`Buckets` -\u003e ` Create Bucket`，创建一个名为`lipstick-db`的资源桶。\n\n## 项目依赖\n\n首先安装项目依赖：\n\n```shell\n# python依赖\npip install pipenv\npipenv install\n# 进入pipenv环境\npipenv shell\n# nodejs依赖\ncd ui\nyarn\n```\n\n## 环境变量配置\n\n项目有一个`.env.example`文件，复制这个文件，并重命名为`.env`，后续的步骤中，你将会在这个文件中配置项目所需的环境变量。\n\n## 数据获取\n\n项目所用到的口红和试色图片数据整理在[维格表](vika.cn)，请注册维格表账号，并把[口红数据库](https://vika.cn/share/shrJ5LfM3jqHj0ooaoCbL)另存为副本。\n\n获得数据副本之后，请按照以下图示，记录以下几个字段，填入`.env`：\n\n![vika-setup](./assets/vika-setup.png)\n\n![vika-setup2](./assets/vika-setup2.png)\n\n![vika-setup3](./assets/vika-setup3.png)\n\n使用以下命令导入数据：\n\n```shell\nmake full-import\n\n# MacOS需要使用以下命令\nJINA_MP_START_METHOD=forkserver make full-import\n```\n\n## 启动Jina Flow\n\n命令行回到项目根目录之后：\n\n```shell\nmake jina-local\n\n# MacOS 请使用\nJINA_MP_START_METHOD=forkserver make jina-local\n```\n\nJina Flow服务器会在8888端口启动\n\n## 启动FastAPI Server\n\n命令行回到项目根目录之后：\n\n```shell\n# 正常启动\nmake main-app\n\n# 开发过程中可以使用reload模式启动\nmake main-app args=\"--host 0.0.0.0 --reload\"\n\n# MacOS需要添加以下命令：\nJINA_MP_START_METHOD=forkserver make main-app args=\"--host 0.0.0.0 --reload\"\n```\n\nFastAPI服务器会在8000端口启动\n\n## 启动UI\n\n```shell\ncd ui\nyarn dev\n```\n\nUI会在端口3000启动\n\n# 部署流程\n\n## 构建docker镜像\n\n```shell\nmake build-jina-docker #请确保数据已经在本地正确导入之后再运行\nmake build-fastapi-docker\n```\n\n构建之后可以直接通过提供的docker-compose部署：\n\n```shell\ndocker-compose up -d\n```\n\n推荐部署到4核8G的服务器上。\n\nUI部署请参考官方NextJS的部署方法，目前国内推荐使用[腾讯云SCF部署](https://cloud.tencent.com/document/product/1229/59270)，海外推荐使用[Vercel](https://vercel.com/guides/deploying-nextjs-with-vercel)。\n\n## k8s部署\n\n请参考`k8s`目录下的文件部署。目前k8s部署仅作为参考用，由于项目使用annlite存储数据，在搜索请求时容易导致OOM出错，请自行选择[外部存储方案](https://docarray.jina.ai/advanced/document-store/benchmark/)，对应调整之后再部署。\n\n# 开源证书 License\n\n[Apache License v2](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhr0909%2Flipstick-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flhr0909%2Flipstick-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhr0909%2Flipstick-db/lists"}