diff --git a/.github/actions/release_artifact/action.yml b/.github/actions/release_artifact/action.yml index 1ce2338ef..04fb92ff1 100644 --- a/.github/actions/release_artifact/action.yml +++ b/.github/actions/release_artifact/action.yml @@ -58,7 +58,7 @@ runs: BIN_PATH="${GITHUB_WORKSPACE}/target/${{ env.build_target }}/release/${{ inputs.bin_name }}" MODEL_PATH="${GITHUB_WORKSPACE}/assets/${{ inputs.model_full_name }}" RUNTIME_PATH="${GITHUB_WORKSPACE}/assets/${{ inputs.runtime_full_name }}/${{ env.runtime_target }}" - DOCKERFILE_PATH="${GITHUB_WORKSPACE}/web-api/Dockerfile" + DOCKERFILE_PATH="${GITHUB_WORKSPACE}/web-api/Dockerfile.release" ARCHIVE_NAME="${{ inputs.archive_name }}" PYTHON_WORKSPACE="${GITHUB_WORKSPACE}/snippet-extractor/" diff --git a/web-api/Dockerfile.release b/web-api/Dockerfile.release new file mode 100644 index 000000000..2d3ff45e2 --- /dev/null +++ b/web-api/Dockerfile.release @@ -0,0 +1,16 @@ +FROM debian:12.4 + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates python3.11 pipenv \ + ; \ + # rustls in aws + update-ca-certificates + +WORKDIR /app +COPY ./ ./ + +RUN pipenv install --deploy && pipenv run python -c 'import nltk; nltk.download("punkt")' + +ENTRYPOINT ["/app/server.bin"]