mirror of
https://github.com/leon-ai/leon.git
synced 2024-10-03 20:57:55 +03:00
BREAKING: upgrade from Python 3.9
to Python 3.11
This commit is contained in:
parent
871617649a
commit
1314217e00
@ -50,7 +50,7 @@ LEON_PY_TCP_SERVER_HOST=0.0.0.0
|
||||
LEON_PY_TCP_SERVER_PORT=1342
|
||||
|
||||
# Path to the Pipfile
|
||||
PIPENV_PIPFILE=bridges/python/src/Pipfile
|
||||
PIPENV_PIPFILE=tcp_server/src/Pipfile
|
||||
|
||||
# Path to the virtual env in .venv/
|
||||
PIPENV_VENV_IN_PROJECT=true
|
||||
|
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -178,11 +178,11 @@ Once Pyenv installed, run:
|
||||
|
||||
```bash
|
||||
# Install Python
|
||||
pyenv install 3.9.10 --force
|
||||
pyenv global 3.9.10
|
||||
pyenv install 3.11.9 --force
|
||||
pyenv global 3.11.9
|
||||
|
||||
# Install Pipenv
|
||||
pip install pipenv==2022.7.24
|
||||
pip install pipenv==2024.0.1
|
||||
```
|
||||
|
||||
Your Python environment should be ready now. So now you can set up the respective environments according to what you are going to contribute to and build them:
|
||||
|
@ -28,10 +28,10 @@ jobs:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9.10
|
||||
python-version: 3.11.9
|
||||
|
||||
- name: Install Pipenv
|
||||
run: pip install --upgrade pip && pip install pipenv==2022.7.24
|
||||
run: pip install --upgrade pip && pip install pipenv==2024.0.1
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
@ -73,7 +73,7 @@ jobs:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9.10
|
||||
python-version: 3.11.9
|
||||
|
||||
- name: Set Python bridge version
|
||||
working-directory: bridges/python/src
|
||||
|
6
.github/workflows/pre-release-tcp-server.yml
vendored
6
.github/workflows/pre-release-tcp-server.yml
vendored
@ -26,10 +26,10 @@ jobs:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9.10
|
||||
python-version: 3.11.9
|
||||
|
||||
- name: Install Pipenv
|
||||
run: pip install --upgrade pip && pip install pipenv==2022.7.24
|
||||
run: pip install --upgrade pip && pip install pipenv==2024.0.1
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
@ -71,7 +71,7 @@ jobs:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9.10
|
||||
python-version: 3.11.9
|
||||
|
||||
- name: Set TCP server version
|
||||
working-directory: tcp_server/src
|
||||
|
@ -4,7 +4,7 @@ verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[requires]
|
||||
python_version = "3.9.10"
|
||||
python_version = "3.11.9"
|
||||
|
||||
[packages]
|
||||
setuptools = "*"
|
||||
|
@ -54,7 +54,7 @@
|
||||
"build:nodejs-bridge": "tsx scripts/build-binaries.js nodejs-bridge",
|
||||
"build:python-bridge": "tsx scripts/build-binaries.js python-bridge",
|
||||
"build:tcp-server": "tsx scripts/build-binaries.js tcp-server",
|
||||
"start:tcp-server": "cross-env LD_LIBRARY_PATH=`python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + \":\" + os.path.dirname(nvidia.cudnn.lib.__file__))'` PIPENV_PIPFILE=tcp_server/src/Pipfile pipenv run python tcp_server/src/main.py",
|
||||
"start:tcp-server": "cross-env PIPENV_PIPFILE=tcp_server/src/Pipfile LD_LIBRARY_PATH=`PIPENV_PIPFILE=tcp_server/src/Pipfile pipenv run python -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + \":\" + os.path.dirname(nvidia.cudnn.lib.__file__))'` pipenv run python tcp_server/src/main.py",
|
||||
"start": "cross-env LEON_NODE_ENV=production node server/dist/pre-check.js && node server/dist/index.js",
|
||||
"python-bridge": "cross-env PIPENV_PIPFILE=bridges/python/src/Pipfile pipenv run python bridges/python/src/main.py server/src/intent-object.sample.json",
|
||||
"train": "tsx scripts/train/run-train.js",
|
||||
|
@ -136,7 +136,7 @@ SPACY_MODELS.set('fr', {
|
||||
* PyTorch will automatically download nvidia-* packages and bundle them.
|
||||
*
|
||||
* It is important to specify the "--ignore-installed" flag to make sure the
|
||||
* "~/.pyenv/versions/3.9.10/lib/python3.9/site-packages" is not used in case
|
||||
* "~/.pyenv/versions/3.11.9/lib/python3.11/site-packages" is not used in case
|
||||
* NVIDIA deps are already installed. Otherwise, it won't install it in our
|
||||
* TCP server .venv as it is already installed (satisfied) in
|
||||
* the path mentioned above
|
||||
@ -235,7 +235,7 @@ SPACY_MODELS.set('fr', {
|
||||
'Please check the error above. It might be related to Microsoft C++ Build Tools. If it is, you can check here: "https://stackoverflow.com/a/64262038/1768162" then restart your machine and retry'
|
||||
)
|
||||
LogHelper.error(
|
||||
'If it is related to some hash mismatch, you can try by installing Pipenv 2022.7.24: pip install pipenv==2022.7.24'
|
||||
'If it is related to some hash mismatch, you can try by installing Pipenv 2024.0.1: pip install pipenv==2024.0.1'
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[requires]
|
||||
python_version = "3.9.10"
|
||||
python_version = "3.11.9"
|
||||
|
||||
[packages]
|
||||
# Setup
|
||||
|
@ -49,14 +49,14 @@ options = {
|
||||
if 'macos' not in sysconfig.get_platform():
|
||||
options['build_exe']['include_files'] = [
|
||||
*options['build_exe']['include_files'],
|
||||
('tcp_server/src/.venv/lib/python3.9/site-packages/nvidia/cudnn/lib', 'lib/nvidia/cudnn/lib')
|
||||
('tcp_server/src/.venv/lib/python3.11/site-packages/nvidia/cudnn/lib', 'lib/nvidia/cudnn/lib')
|
||||
]
|
||||
|
||||
# Include private libraries from the tokenizers package for Linux
|
||||
# if 'linux' in sysconfig.get_platform():
|
||||
# options['build_exe']['include_files'] = [
|
||||
# *options['build_exe']['include_files'],
|
||||
# ('tcp_server/src/.venv/lib/python3.9/site-packages/tokenizers.libs', 'lib/tokenizers.libs')
|
||||
# ('tcp_server/src/.venv/lib/python3.11/site-packages/tokenizers.libs', 'lib/tokenizers.libs')
|
||||
# ]
|
||||
|
||||
executables = [
|
||||
|
Loading…
Reference in New Issue
Block a user