diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..5550c64 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,20 @@ +name: Docker + +on: + push: + pull_request: + +jobs: + build_publish_containers: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Build/push + uses: whoan/docker-build-with-cache-action@v5 + with: + registry: ghcr.io + image_name: ${{ github.actor }}/exquisite-corpus + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..aadd5db --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:20.04 + +RUN apt-get update -qq -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + wget \ + python3-dev \ + haskell-stack \ + libmecab-dev \ + libicu-dev \ + jq \ + xml2 \ + curl \ + python3-pip \ + git && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /exquisite/ + +RUN git clone https://github.com/LuminosoInsight/wikiparsec && \ + cd wikiparsec && \ + stack clean && \ + stack build && \ + stack install --local-bin-path /usr/bin + +ADD . /exquisite/ + +RUN pip3 install -e .