diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..fd712d67 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.10-slim + +RUN apt-get update +RUN apt install -y git +RUN git clone https://github.com/agoenergy/ptx-boa.git + +WORKDIR ptx-boa + +RUN git checkout develop +RUN pip3 install -r requirements.txt + +EXPOSE 80 + +ENTRYPOINT ["streamlit", "run", "ptxboa_streamlit.py", "--server.port=80", "--server.address=0.0.0.0"] diff --git a/README.md b/README.md index 7e7a4014..e2a960ee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ PtX-BOA is a tool that aims to promote the export of a wide range of PtX molecules, including amongst others, green ammonia, e-methanol and synthetic fuels. Users can calculate the delivered cost of PtX molecules from an export country to an import country, with a detailed cost breakdown comparison highlighting the competitive edge of one country against another. - ## Development ### Setup @@ -15,3 +14,18 @@ conda activate ptx-boa conda env update --prune --file environment.yaml pre-commit install ``` + +## Deployment + +### Create image and publish to docker hub + +```bash +docker build -t wingechr/ptx-boa:0.0.1 . +docker push wingechr/ptx-boa:0.0.1 +``` + +### Run (in cloud or locally) + +```bash +docker run -p 80:80 wingechr/ptx-boa:0.0.1 +```