Skip to content

Commit

Permalink
feat(deployment): Basic script working
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Dec 6, 2024
1 parent 2ba7bff commit 7efd24b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions deployment/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash

# Setup
apt install docker.io -y
apt install docker.io unzip -y

# Cleaning previous agent
rm -rf /root/libertai-agent
docker stop libertai-agent && docker rm $_

# Deploying the new agent
unzip /tmp/libertai-agent.zip -d /root/libertai-agent
wget https://TODO -o /tmp/libertai-agent.Dockerfile
wget https://raw.githubusercontent.com/Libertai/libertai-agents/refs/heads/reza/deployment-instances/deployment/$2.Dockerfile -O /tmp/libertai-agent.Dockerfile -q
docker build /root/libertai-agent \
-f /tmp/libertai-agent.Dockerfile \
-t libertai-agent \
--build-arg PYTHON_VERSION=$1
docker run -p 8000:8000 libertai-agent
docker run --name libertai-agent -p 8000:8000 -d libertai-agent
2 changes: 1 addition & 1 deletion deployment/pip.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ COPY . .

EXPOSE 8000

CMD ["fastapi", "run", "src/main.py"]
CMD ["fastapi", "run", "src/main.py"]
2 changes: 1 addition & 1 deletion deployment/poetry.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ COPY . .

EXPOSE 8000

CMD ["fastapi", "run", "src/main.py"]
CMD ["fastapi", "run", "src/main.py"]

0 comments on commit 7efd24b

Please sign in to comment.