Luca Foppiano commited on
Commit
63b0e17
2 Parent(s): 05d2b38 0c0659f

Merge pull request #6 from lfoppiano/fix-docker

Browse files
Files changed (2) hide show
  1. .github/workflows/ci-build.yml +22 -1
  2. Dockerfile +5 -2
.github/workflows/ci-build.yml CHANGED
@@ -33,4 +33,25 @@ jobs:
33
  flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34
  # - name: Test with pytest
35
  # run: |
36
- # pytest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34
  # - name: Test with pytest
35
  # run: |
36
+ # pytest
37
+
38
+ docker-build:
39
+ needs: [build]
40
+ runs-on: ubuntu-latest
41
+
42
+ steps:
43
+ - name: Create more disk space
44
+ run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
45
+ - uses: actions/checkout@v2
46
+ - name: Build and push
47
+ id: docker_build
48
+ uses: mr-smithers-excellent/docker-build-push@v5
49
+ with:
50
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
51
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
52
+ image: lfoppiano/document-insights-qa
53
+ registry: docker.io
54
+ pushImage: ${{ github.event_name != 'pull_request' }}
55
+ tags: latest-develop
56
+ - name: Image digest
57
+ run: echo ${{ steps.docker_build.outputs.digest }}
Dockerfile CHANGED
@@ -14,7 +14,10 @@ COPY requirements.txt .
14
  RUN pip3 install -r requirements.txt
15
 
16
  COPY .streamlit ./.streamlit
17
- COPY *.py .
 
 
 
18
 
19
  # extract version
20
  COPY .git ./.git
@@ -27,4 +30,4 @@ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
27
 
28
  ENV PYTHONPATH "${PYTHONPATH}:."
29
 
30
- ENTRYPOINT ["streamlit", "run", "document_qa/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
14
  RUN pip3 install -r requirements.txt
15
 
16
  COPY .streamlit ./.streamlit
17
+ COPY document_qa ./document_qa
18
+ COPY grobid_client_generic.py .
19
+ COPY client.py .
20
+ COPY streamlit_app.py .
21
 
22
  # extract version
23
  COPY .git ./.git
 
30
 
31
  ENV PYTHONPATH "${PYTHONPATH}:."
32
 
33
+ ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]