Skip to content

Commit

Permalink
Merge branch 'docker-deployment' into local-llm-fc
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyuanjushi committed Jun 14, 2024
2 parents 7adaba0 + dcef6e0 commit c2662c4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 21 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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/*

# 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

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

# Set the default command to run when starting the container
CMD ["/bin/bash"]
43 changes: 22 additions & 21 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,35 @@ def main():

# construct example agents

travel_agent = agent_thread_pool.submit(
agent_factory.run_agent,
"TravelAgent", "I want to take a trip to Paris, France from July 4th to July 10th 2024 and I am traveling from New York City. Help me plan this trip."
)

math_agent = agent_thread_pool.submit(
agent_factory.run_agent,
"MathAgent",
"Convert 15000 MXN to Canadian Dollars and find out how much it would be in USD if 1 CAD equals 0.79 USD."
)

academic_agent = agent_thread_pool.submit(
agent_factory.run_agent,
"AcademicAgent",
"Summarize recent advancements in quantum computing from the past five years."
)
# travel_agent = agent_thread_pool.submit(
# agent_factory.run_agent,
# "TravelAgent", "I want to take a trip to Paris, France from July 4th to July 10th 2024 and I am traveling from New York City. Help me plan this trip."
# )

# math_agent = agent_thread_pool.submit(
# agent_factory.run_agent,
# "MathAgent",
# "Convert 15000 MXN to Canadian Dollars and find out how much it would be in USD if 1 CAD equals 0.79 USD."
# )

# academic_agent = agent_thread_pool.submit(
# agent_factory.run_agent,
# "AcademicAgent",
# "Summarize recent advancements in quantum computing from the past five years."
# )

rec_agent = agent_thread_pool.submit(
agent_factory.run_agent,
"RecAgent", "Recommend two movies with groundbreaking visual effects released in the last fifteen years ranked between 1 and 20 with ratings above 8.0."
)

creation_agent = agent_thread_pool.submit(
agent_factory.run_agent,
"CreationAgent", "Create an image of a lush jungle with an ancient temple, evoking a sense of mystery and adventure."
)
# creation_agent = agent_thread_pool.submit(
# agent_factory.run_agent,
# "CreationAgent", "Create an image of a lush jungle with an ancient temple, evoking a sense of mystery and adventure."
# )

agent_tasks = [travel_agent, rec_agent, creation_agent, math_agent, academic_agent]
# agent_tasks = [travel_agent, rec_agent, creation_agent, math_agent, academic_agent]
agent_tasks = [rec_agent]

for r in as_completed(agent_tasks):
res = r.result()
Expand Down

0 comments on commit c2662c4

Please sign in to comment.