-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deployment): Basic script working
- Loading branch information
1 parent
2ba7bff
commit 7efd24b
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ COPY . . | |
|
||
EXPOSE 8000 | ||
|
||
CMD ["fastapi", "run", "src/main.py"] | ||
CMD ["fastapi", "run", "src/main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ COPY . . | |
|
||
EXPOSE 8000 | ||
|
||
CMD ["fastapi", "run", "src/main.py"] | ||
CMD ["fastapi", "run", "src/main.py"] |