ogre-cli
The quickest way to start using ogre.run
Last updated
The quickest way to start using ogre.run
Last updated
This package is currently outdated and on the track to be deprecated in favor of miniogre.
Ogre CLI is a framework built around Docker that automates the creation of containerized runtime environments for Python code.
It analyzes the source code inside a given folder and automatically creates an environment
No Dockerfile? Ogre takes care of it for you
No requirements file? Ogre generates one for you
This get-started focuses on the simplest form of the Ogre CLI, which can be used offline, without a token. To unlock the full power of the Ogre CLI, and follow the .
IMPORTANT: make sure you have Docker installed. Follow .
Install the Ogre CLI with python-pip
To check if everything was successfully installed, type:
You will be greeted by the ogre menu.
Now let's "ogrerize" your code. As an example, we use , a popular AI GitHub repository. But you are also free to try on any Python code base of your choice.
Clone the nanoGPT repository:
Go inside its folder:
Finally, generate the ogre environment:
The environment building starts and you will see something similar to the log below:
Once the build is done, you can check that the environment is deployed and running:
Ogre read your Python source code and created a list of all the dependencies that needed to be installed. It did that without needing a requirements.txt
file.
As the Docker image is built, it uses the ogre-generated requirements.txt
to install all the dependencies in the image.
You can now access the runtime environment, with all the dependencies installed, and start working using either of the following options:
Type ogre --attach
, which will take you inside the container
Configure ogre. This generates the ogre.yml
file that contains the specifications for ogre to generate the runtime environment (see details ):
IMPORTANT: If you run into problems in this step, please contact us:
Notice that the ogre environment is allocated to the localhost address .
Ogre also created a Dockerfile based on the . This Dockerfile is used by the Docker engine to build a unique Docker image for that repository, all without the need for the user to manually specify the build parameters.
On a web browser, visit the address returned by the ogre --info
command, in this case . You will be greeted by a Jupyter Notebook interface that provides the developer with more options to interact with the code. The default password is ogre123
, but you can define your own by .
ogre --info