Skip to content

Commit

Permalink
Merge pull request #397 from xxyzz/container
Browse files Browse the repository at this point in the history
Add Containerfile
  • Loading branch information
xxyzz authored Nov 13, 2023
2 parents 87d6cd3 + 39cf37b commit f66999a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish container

on:
workflow_run:
workflows: [test]
types:
- completed
branches:
- master

jobs:
publish_container:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- run: podman login -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- run: podman build -t ghcr.io/${{ github.repository }} .
- run: podman push ghcr.io/${{ github.repository }}
7 changes: 7 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM docker.io/python
RUN apt update && apt install -y lbzip2
COPY pyproject.toml README.md LICENSE .
COPY src src
RUN python -m pip install -U pip
RUN python -m pip install --use-pep517 .
ENTRYPOINT ["wiktwords"]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,18 @@ word `thrill` as an English verb (only one part-of-speech is shown here):

### Installing

Preparation: on Linux (example from Ubuntu 20.04), you may need to
#### Use container:

```
$ podman run -it --rm ghcr.io/tatuylonen/wiktextract --help
```

#### Install from source:

On Linux (example from Ubuntu 20.04), you may need to
first install the `build-essential` and `python3-dev` packages
with `apt update && apt install build-essential python3-dev python3-pip lbzip2`.

Install `wiktextract` from source:

```
git clone https://github.com/tatuylonen/wiktextract.git
cd wiktextract
Expand All @@ -316,12 +322,6 @@ python -m pip install -U pip
python -m pip install --use-pep517 .
```

Alternatively, you can install the package from pypi.org:

```
python -m pip install wiktextract
```

This software requires Python 3.

### Running tests
Expand Down

0 comments on commit f66999a

Please sign in to comment.