Improved install experience

This commit is contained in:
2025-04-01 15:26:50 +00:00
parent c00256f723
commit 78c71ab8b4
4 changed files with 47 additions and 55 deletions

31
pyproject.toml Normal file
View 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"]

3
scripts/add_to_environment.sh Normal file → Executable file
View File

@@ -1,6 +1,4 @@
#!/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
@@ -15,4 +13,3 @@ add_to_environment() {
sed -i "s|^PATH=.*|PATH=\"$path:$current_path\"|" /etc/environment
fi
fi
}

View File

@@ -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"

View File

@@ -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',
)