-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Hermes run on a container #67
Merged
Merged
Conversation
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
This worked lovely. Thank you so much for your help |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Hermes dev instance.
Several changes were made in order to allow Hermes to run in a container, and make the database persistent across multiple instances of the container.
Moved database file path.
To allow a persistent database across multiple instances of the container, the file should be saved to the host system.
This was accomplished by linking a directory from the host system to the container system.
The host linked directory should be empty before the first run of the container in order to work.
The new path of the database from the project root is:
db/hermes.db
.Added overwrite mode to the startup.py script
The python script
startup.py
now accepts the argument--overwrite
.If this argument is present, the script re-initializes the database, and overwrites all previously stored information.
Created a script to run the project
The script
run.sh
checks if the database is already initialized. If not, runs the scriptstartup.py
on overwrite mode.This allows for an easy way to run the system with no information, by moving (or deleting) the
hermes.db
file on the host system.At last, the script
run.sh
launches uvicorn to host on0.0.0.0
.Created a Dockerfile to make an image of the project
This Dockerfile copies all the files from the project to the image, installs the requirements, and has an optional step to run
run.sh
.This final step may be overridden by running the container with an entrypoint.
The arguments
-ti --entrypoint=/bin/bash
may be used to enter the container for debugging purposes.Updated README.md
Provisional instructions were added to show how to build a docker image from the project.