Skip to content

Commit

Permalink
fix: mv vllm to cuda-enable requirement file and update Dockerfile (#160
Browse files Browse the repository at this point in the history
)

* docs: add pull request template

* chore: mv vllm to cuda-enabled dependencies

* chore: update Dockerfile

* refactor: rename llm_kernel as llm_core
  • Loading branch information
dongyuanjushi authored Jul 5, 2024
1 parent ac14f82 commit 2a3142a
Show file tree
Hide file tree
Showing 20 changed files with 15 additions and 36 deletions.
28 changes: 5 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
# Use the Ubuntu 22.04 base image
FROM ubuntu:22.04

# Update the package list and install dependencies
RUN apt-get update && apt-get install -y \
git \
wget \
curl \
vim \
tmux \
&& rm -rf /var/lib/apt/lists/*
git wget curl vim tmux python3 python3-pip

# Install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh \
&& bash /tmp/miniconda.sh -b -p /opt/conda \
&& rm /tmp/miniconda.sh \
&& /opt/conda/bin/conda init

# Set path to conda
ENV PATH=/opt/conda/bin:$PATH
WORKDIR /workspace

RUN curl https://ollama.ai/install.sh | sh

# Create a working directory
WORKDIR /workspace

RUN conda create -n aios python=3.11 -y \
&& /bin/bash -c "source /opt/conda/bin/activate aios" \
&& git clone https://github.com/dongyuanjushi/AIOS.git \
&& cd AIOS
RUN git clone https://github.com/agiresearch/AIOS.git \
&& cd AIOS \
&& pip install -r requirements.txt

# Set the default command to run when starting the container
CMD ["/bin/bash"]
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@

<a href="https://trendshift.io/repositories/8908" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8908" alt="agiresearch%2FAIOS | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>

AIOS, a Large Language Model (LLM) Agent operating system, embeds large language model into Operating Systems (OS) as the brain of the OS, enabling an operating system "with soul" -- an important step towards AGI. AIOS is designed to optimize resource allocation, facilitate context switch across agents, enable concurrent execution of agents, provide tool service for agents, maintain access control for agents, and provide a rich set of toolkits for LLM Agent developers.

AIOS is to build a Large Language Model (LLM) Agent operating system, which intends to embed large language model into the Operating System as the brain of the OS. AIOS is designated to address problems (e.g., scheduling, context switch, memory management, etc.) during the development and deployment of LLM-based agents for a better ecosystem among agent developers and users.

## 🏠 Architecture of AIOS
<p align="center">
<img src="images/AIOS-Architecture.png">
</p>

The objective of AIOS is to provide the LLM kernel which will be an abstraction on top of the OS kernel. The kernel intends to facilitate the installation of agents, which are utilities the kernel can interact with in order to perform tasks the user queries. For example, the MathAgent facilitates mathematical computations, such as currency conversion, integral calculus, or even basic algebraic manipulation. The method of installation is intended to be in a manner similar to [apt](https://en.wikipedia.org/wiki/APT_(software)) or [brew](https://brew.sh).

AIOS provides the LLM kernel as an abstraction on top of the OS kernel. The kernel intends to facilitate the installation and usage of agents.
At the present moment, AIOS is a userspace wrapper around the current kernel. However, this is subject to change as outlined in the [Q4 Goals and Objectives](https://github.com/agiresearch/AIOS/issues/127).

## 📰 News
Expand Down
2 changes: 1 addition & 1 deletion aios/llm_kernel/README.md → aios/llm_core/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# aios/llm_kernel/
# aios/llm_core/

This directory contains wrapper classes that abstract the LLMs into a single class called LLMKernel. Currently, the following models are supported:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion aios/scheduler/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from threading import Thread

from aios.llm_kernel.llms import LLMKernel
from aios.llm_core.llms import LLMKernel

from aios.utils.logger import SchedulerLogger
class BaseScheduler:
Expand Down
4 changes: 1 addition & 3 deletions eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@

import warnings

from aios.llm_kernel import llms
from aios.llm_core import llms

from concurrent.futures import ThreadPoolExecutor


from aios.utils.utils import delete_directories
from aios.utils.calculator import get_numbers_concurrent, get_numbers_sequential, comparison

import argparse


from dotenv import load_dotenv

# Construct help message and parse argumets using argparse
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import warnings

from aios.llm_kernel import llms
from aios.llm_core import llms

from concurrent.futures import ThreadPoolExecutor, as_completed

Expand Down
2 changes: 2 additions & 0 deletions requirements-cuda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r requirements.txt
vllm
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ protobuf==4.25.3
pydantic==2.7.0
Pympler==1.0.1
click==8.1.7
ollama==0.1.7
ollama
pyopenagi
vllm
2 changes: 1 addition & 1 deletion simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import warnings

from aios.llm_kernel import llms
from aios.llm_core import llms


from aios.utils.utils import delete_directories
Expand Down

0 comments on commit 2a3142a

Please sign in to comment.