mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-31 16:35:29 +00:00
Finalized conda removal
This commit is contained in:
parent
1261baac0e
commit
75e2b77170
4
app.py
4
app.py
@ -70,7 +70,7 @@ packages: List[Tuple[str, str]] = [
|
||||
("freedom_search", "0.1.9"),
|
||||
("scrapemaster", "0.2.0"),
|
||||
("lollms_client", "0.7.5"),
|
||||
("lollmsvectordb", "1.0.7"),
|
||||
("lollmsvectordb", "1.1.1"),
|
||||
]
|
||||
|
||||
def check_pn_libs():
|
||||
@ -226,7 +226,7 @@ if __name__ == "__main__":
|
||||
|
||||
# A simple fix for v 11.0 to 12 alpha
|
||||
if config.rag_vectorizer=="bert":
|
||||
config.rag_vectorizer="semantic"
|
||||
config.rag_vectorizer="tfidf"
|
||||
config.save_config()
|
||||
|
||||
LOLLMSWebUI.build_instance(config=config, lollms_paths=lollms_paths, args=args, sio=sio)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 137
|
||||
version: 138
|
||||
binding_name: null
|
||||
model_name: null
|
||||
model_variant: null
|
||||
@ -273,7 +273,7 @@ audio_silenceTimer: 5000
|
||||
|
||||
# Data vectorization
|
||||
rag_databases: [] # This is the list of paths to database sources. Each database is a folder containing data
|
||||
rag_vectorizer: semantic # possible values semantic, tfidf, openai
|
||||
rag_vectorizer: tfidf # possible values semantic, tfidf, openai
|
||||
rag_vectorizer_model: sentence-transformers/bert-base-nli-mean-tokens # The model name if applicable
|
||||
rag_vectorizer_parameters: null # Parameters of the model in json format
|
||||
rag_chunk_size: 512 # number of tokens per chunk
|
||||
|
@ -378,41 +378,41 @@ async def install_app(app_name: str, auth: AuthRequest):
|
||||
if description_path.exists() and requirements.exists():
|
||||
with open(description_path, 'r') as file:
|
||||
description_data = yaml.safe_load(file)
|
||||
if description_data.get("has_server", (Path(app_path)/"README.md").exists()):
|
||||
current_env = get_current_conda_env()
|
||||
env_name = app_path.stem
|
||||
import conda.cli
|
||||
ASCIIColors.info("Creating a new environment")
|
||||
conda.cli.main('create', '-n', env_name, 'python=3.11', '-y')
|
||||
# Activate the new conda environment
|
||||
activate_command = f"conda activate {env_name}"
|
||||
if os.name == 'nt': # Windows
|
||||
activate_command = f"call activate {env_name}"
|
||||
if description_data.get("has_server", (Path(app_path)/"server.py").exists()):
|
||||
pass
|
||||
# current_env = get_current_conda_env()
|
||||
# env_name = app_path.stem
|
||||
# ASCIIColors.info("Creating a new environment")
|
||||
# conda.cli.main('create', '-n', env_name, 'python=3.11', '-y')
|
||||
# # Activate the new conda environment
|
||||
# activate_command = f"conda activate {env_name}"
|
||||
# if os.name == 'nt': # Windows
|
||||
# activate_command = f"call activate {env_name}"
|
||||
|
||||
# Install requirements
|
||||
install_command = f"{activate_command} && pip install -r {requirements}"
|
||||
# install_command = f"{activate_command} && pip install -r {requirements}"
|
||||
|
||||
try:
|
||||
ASCIIColors.info(f"Creating a new environment: {env_name}")
|
||||
subprocess.run(activate_command, shell=True, check=True)
|
||||
# try:
|
||||
# ASCIIColors.info(f"Creating a new environment: {env_name}")
|
||||
# subprocess.run(activate_command, shell=True, check=True)
|
||||
|
||||
ASCIIColors.info("Installing requirements")
|
||||
subprocess.run(install_command, shell=True, check=True)
|
||||
# ASCIIColors.info("Installing requirements")
|
||||
# subprocess.run(install_command, shell=True, check=True)
|
||||
|
||||
ASCIIColors.success(f"Environment '{env_name}' created and requirements installed successfully.")
|
||||
except subprocess.CalledProcessError as e:
|
||||
ASCIIColors.error(f"An error occurred: {str(e)}")
|
||||
finally:
|
||||
# Switch back to the original environment
|
||||
if current_env:
|
||||
switch_back_command = f"conda activate {current_env}"
|
||||
if os.name == 'nt': # Windows
|
||||
switch_back_command = f"call activate {current_env}"
|
||||
# ASCIIColors.success(f"Environment '{env_name}' created and requirements installed successfully.")
|
||||
# except subprocess.CalledProcessError as e:
|
||||
# ASCIIColors.error(f"An error occurred: {str(e)}")
|
||||
# finally:
|
||||
# # Switch back to the original environment
|
||||
# if current_env:
|
||||
# switch_back_command = f"conda activate {current_env}"
|
||||
# if os.name == 'nt': # Windows
|
||||
# switch_back_command = f"call activate {current_env}"
|
||||
|
||||
ASCIIColors.info(f"Switching back to the original environment: {current_env}")
|
||||
subprocess.run(switch_back_command, shell=True, check=True)
|
||||
else:
|
||||
ASCIIColors.warning("Could not determine the original environment. You may need to switch back manually.")
|
||||
# ASCIIColors.info(f"Switching back to the original environment: {current_env}")
|
||||
# subprocess.run(switch_back_command, shell=True, check=True)
|
||||
# else:
|
||||
# ASCIIColors.warning("Could not determine the original environment. You may need to switch back manually.")
|
||||
except Exception as ex:
|
||||
trace_exception(ex)
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
name: lollms_env
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge # Adds a wider selection of packages, especially for less common ones
|
||||
dependencies:
|
||||
- python=3.11
|
||||
- numpy=1.26.*
|
||||
- pandas
|
||||
- pillow>=9.5.0
|
||||
- pyyaml
|
||||
- requests
|
||||
- rich
|
||||
- scipy
|
||||
- tqdm
|
||||
- setuptools
|
||||
- wheel
|
||||
- psutil
|
||||
- pytest
|
||||
- gitpython
|
||||
- beautifulsoup4
|
||||
- packaging
|
||||
- fastapi
|
||||
- uvicorn
|
||||
- pydantic
|
||||
- selenium
|
||||
- aiofiles
|
||||
- ffmpeg
|
||||
- pip # Conda will manage pip installation
|
||||
- pip:
|
||||
- colorama
|
||||
- ascii-colors>=0.4.2
|
||||
- python-multipart
|
||||
- python-socketio
|
||||
- python-socketio[client]
|
||||
- python-socketio[asyncio_client]
|
||||
- tiktoken
|
||||
- pipmaster>=0.1.7
|
||||
- lollmsvectordb>=1.1.0
|
||||
- freedom-search>=0.1.9
|
||||
- scrapemaster>=0.2.0
|
||||
- lollms_client>=0.7.5
|
||||
- zipfile36
|
||||
- freedom_search
|
@ -1 +1 @@
|
||||
Subproject commit 9e073cfbc72f567938ba86d92aa5252ea0bb05ea
|
||||
Subproject commit ae87383034323bfba1157e85ef735570c7097e06
|
@ -1 +1 @@
|
||||
Subproject commit fbf49b7b765d0d2d98d7154e82b3ccd913a29f09
|
||||
Subproject commit c16a875dbddc1e8a3d5ee98a7244bc2759ef6c98
|
Loading…
x
Reference in New Issue
Block a user