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

fix deps installation #1894

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions paddlex/repo_manager/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@

import os
import sys
from pathlib import Path
from collections import OrderedDict

from ..utils import logging
from .utils import install_deps_using_pip
from .utils import install_packages_using_pip
from .meta import get_all_repo_names, get_repo_meta
from .repo import build_repo_instance, build_repo_group_getter, build_repo_group_installer

Expand Down Expand Up @@ -190,9 +191,13 @@ def setup(repo_names,
logging.info(installer.get_deps())

logging.info("Now installing the packages...")
install_deps_using_pip()
if update_repos:
installer.update()
logging.info("All repos are updated.")
installer.install(
force_reinstall=False, no_deps=no_deps, constraints=constraints)
pdx_req_file = Path(__file__).parent.parent.parent / "requirements.txt"
install_packages_using_pip([], req_files=[pdx_req_file])
logging.info("All packages are installed.")


Expand Down
17 changes: 0 additions & 17 deletions paddlex/repo_manager/requirements.txt

This file was deleted.

12 changes: 2 additions & 10 deletions paddlex/repo_manager/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,8 @@ def install_packages_using_pip(pkgs,
return _check_call(args)


def install_deps_using_pip():
""" install requirements """
current_file_path = os.path.dirname(os.path.abspath(__file__))
deps_path = os.path.join(current_file_path, 'requirements.txt')
args = [sys.executable, '-m', 'pip', 'install', '-r', deps_path]
return _check_call(args)


def clone_repo_using_git(url, branch=None):
""" clone_repo_using_git """
def clone_repos_using_git(url, branch=None):
""" clone_repos_using_git """
args = ['git', 'clone', '--depth', '1']
if isinstance(url, str):
url = [url]
Expand Down
19 changes: 18 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,21 @@ shapely
pandas
parsley
requests
tokenizers==0.19.1
tokenizers==0.19.1
tomark~=0.1.4
psutil~=5.9.2
wget
grpcio==1.51.3
pydantic~=1.10.1
editdistance
openpyxl
PyMuPDF==1.20.2
qianfan==0.0.3
langchain==0.0.292
erniebot
premailer
python-docx
unstructured
networkx
Pillow==9.5
ujson