Skip to content

Commit

Permalink
Merge pull request #123 from agoenergy/docker
Browse files Browse the repository at this point in the history
Docker image
  • Loading branch information
joAschauer authored Nov 21, 2023
2 parents 7335c97 + 628df09 commit 0a9370a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

0 comments on commit 0a9370a

Please sign in to comment.