Improved install experience
This commit is contained in:
31
pyproject.toml
Normal file
31
pyproject.toml
Normal file
@@ -0,0 +1,31 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=78", "wheel>=0.45.0", "packaging>=24.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "sia"
|
||||
version = "0.1.0"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"accelerate>=0.26.0",
|
||||
"aiohttp>=3.8.0",
|
||||
"bitsandbytes>=0.41.0",
|
||||
"dotenv-python>=0.0.1",
|
||||
"flash-attn>=2.0.0",
|
||||
"huggingface_hub>=0.16.0",
|
||||
"lxml>=4.9.0",
|
||||
"mistral-common>=1.0.0",
|
||||
"mistralai>=0.0.7",
|
||||
"openai>=1.0.0",
|
||||
"psutil>=5.9.0",
|
||||
"python-dotenv>=1.0.0",
|
||||
"tiktoken>=0.4.0",
|
||||
"torch>=2.0.0",
|
||||
"transformers>=4.30.0"
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
sia = "sia.__main__:main"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["sia"]
|
||||
11
scripts/add_to_environment.sh
Normal file → Executable file
11
scripts/add_to_environment.sh
Normal file → Executable file
@@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
add_to_environment() {
|
||||
local path="$1"
|
||||
# Check if the path is already in the environment file
|
||||
if ! grep -q "$path" /etc/environment; then
|
||||
local path="$1"
|
||||
# Check if the path is already in the environment file
|
||||
if ! grep -q "$path" /etc/environment; then
|
||||
# Get current PATH from environment file
|
||||
current_path=$(grep "^PATH=" /etc/environment | cut -d'"' -f2)
|
||||
|
||||
@@ -14,5 +12,4 @@ add_to_environment() {
|
||||
# Replace existing PATH line with updated one
|
||||
sed -i "s|^PATH=.*|PATH=\"$path:$current_path\"|" /etc/environment
|
||||
fi
|
||||
fi
|
||||
}
|
||||
fi
|
||||
@@ -3,15 +3,15 @@
|
||||
echo "Installing ITB tool..."
|
||||
python3 -m venv "/root/venvs/itb"
|
||||
/root/venvs/itb/bin/pip install -e /root/sia/tools/itb/
|
||||
/root/sia/scripts/add_to_environment "/root/venvs/itb/bin"
|
||||
/root/sia/scripts/add_to_environment.sh "/root/venvs/itb/bin"
|
||||
|
||||
echo "Installing Train tool..."
|
||||
python3 -m venv "/root/venvs/train"
|
||||
/root/venvs/train/bin/pip install -e /root/sia/tools/train/
|
||||
/root/venvs/train/bin/ipython kernel install --name=train
|
||||
/root/sia/scripts/add_to_environment "/root/venvs/train/bin"
|
||||
/root/sia/scripts/add_to_environment.sh "/root/venvs/train/bin"
|
||||
|
||||
echo "Installing SIA core..."
|
||||
python3 -m venv "/root/venvs/sia"
|
||||
/root/venvs/sia/bin/pip install -e /root/sia/
|
||||
/root/sia/scripts/add_to_environment "/root/venvs/sia/bin"
|
||||
/root/sia/scripts/add_to_environment.sh "/root/venvs/sia/bin"
|
||||
36
setup.py
36
setup.py
@@ -1,36 +0,0 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="sia",
|
||||
version="0.1.0",
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
'accelerate>=0.26.0',
|
||||
'aiohttp>=3.8.0',
|
||||
'bitsandbytes>=0.41.0',
|
||||
'dotenv-python>=0.0.1',
|
||||
'flash-attn>=2.0.0',
|
||||
'huggingface_hub>=0.16.0',
|
||||
'lxml>=4.9.0',
|
||||
'mistral-common>=1.0.0',
|
||||
'mistralai>=0.0.7',
|
||||
'openai>=1.0.0',
|
||||
'psutil>=5.9.0',
|
||||
'python-dotenv>=1.0.0',
|
||||
'tiktoken>=0.4.0',
|
||||
'torch>=2.0.0',
|
||||
'transformers>=4.30.0'
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'sia=sia.__main__:main',
|
||||
],
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
'Intended Audience :: Developers',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
],
|
||||
python_requires='>=3.10',
|
||||
)
|
||||
Reference in New Issue
Block a user