diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml new file mode 100644 index 0000000..83b14d0 --- /dev/null +++ b/.github/workflows/docker-test.yml @@ -0,0 +1,30 @@ +name: Docker + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +on: + pull_request: + push: + branches: + - main +jobs: + test_docker_image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + # - ame: Build image + # run: + - uses: docker/build-push-action@v6 + with: + context: . + load: true + tags: nlm-sut + - name: Smoke test + run: | + docker run -d -p 5010:5001 nlm-sut + sleep 20 + curl http://localhost:5010/ diff --git a/Dockerfile b/Dockerfile index 803b4be..e4cc7d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,8 @@ RUN pip install --upgrade pip setuptools RUN apt-get install -y libmagic1 RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts RUN pip install -r requirements.txt -RUN python -m nltk.downloader stopwords -RUN python -m nltk.downloader punkt +RUN python -m nltk.downloader -d /usr/share/nltk_data stopwords +RUN python -m nltk.downloader -d /usr/share/nltk_data punkt RUN python -c "import tiktoken; tiktoken.get_encoding(\"cl100k_base\")" RUN chmod +x run.sh EXPOSE 5001