Skip to content

Latest commit

 

History

History
118 lines (78 loc) · 1.48 KB

README.md

File metadata and controls

118 lines (78 loc) · 1.48 KB

247 Builder

Developing locally

Navigate to the correct directory:

cd builder/container

Set up a virtual environment and activate it:

python3 -m venv .venv
source .venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Run tests:

python3 -m pytest tests/

Run the agent:

python3 main.py

Developing in Docker

Running the Flask Server

Navigate to the correct directory:

cd builder/container

Build the image:

docker build -t builder247 .

Run the container:

docker run builder247

You can also run with a mounted volume if you'd like to change files without updating the container:

docker run -v $(pwd):/app builder247

Running Interactively (using the shell)

Navigate to the correct directory:

cd builder/container

Change this line in the Dockerfile:

CMD ["python", "main.py"]

to

CMD ["/bin/bash"]

Build the image:

docker build -t builder247.

Run the container with a mounted volume:

docker run -it -v $(pwd)/builder:/app builder247

This will give you access to your files within the container and run the container in interactive mode with shell access. You can then run tests inside the container using:

python -m pytest tests/

or

python3 -m pytest tests/

You can also run the flask server in the container with:

python main.py

To exit the container's shell:

exit