-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ jobs: | |
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.KGX_PYPI }} | ||
password: ${{ secrets.KGX_PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
FROM python:3.9 | ||
MAINTAINER Sierra Moxon "[email protected]" | ||
FROM python:3.9-bullseye as builder | ||
|
||
# Clone repository | ||
RUN git clone https://github.com/biolink/kgx | ||
# https://stackoverflow.com/questions/53835198/integrating-python-poetry-with-docker | ||
ENV PYTHONFAULTHANDLER=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONHASHSEED=random \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
POETRY_VERSION=1.2.1 | ||
|
||
# Setup | ||
RUN cd kgx && git checkout tags/2.0.0 && poetry install | ||
# Install Poetry | ||
RUN pip install "poetry==$POETRY_VERSION" | ||
RUN poetry self add "poetry-dynamic-versioning[plugin]" | ||
|
||
# Make data directory | ||
RUN mkdir data | ||
WORKDIR /code | ||
|
||
# Build project. The .git directory is needed for poetry-dynamic-versioning | ||
COPY ./.git ./.git | ||
COPY pyproject.toml poetry.lock README.md . | ||
COPY kgx kgx/ | ||
RUN poetry build | ||
|
||
####################################### | ||
FROM python:3.9-slim-bullseye as runner | ||
|
||
RUN useradd --create-home kgxuser | ||
WORKDIR /kgx | ||
RUN mkdir data | ||
USER kgxuser | ||
ENV PATH="${PATH}:/home/kgxuser/.local/bin" | ||
|
||
COPY --from=builder /code/dist/*.whl /tmp | ||
RUN pip install --user /tmp/*.whl | ||
|
||
# command to run on container start | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters