-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build setup * fixes
- Loading branch information
Showing
10 changed files
with
173 additions
and
45 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.git/ | ||
.github/ | ||
.idea/ | ||
.pytest_cache/ | ||
.venv/ | ||
build/ | ||
dist/ | ||
cython_debug/ | ||
htmlcov/ | ||
*.egg-info/ | ||
.coverage | ||
.DS_Store |
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Use the python slim image | ||
FROM python:3.8.3-slim | ||
|
||
# Add build deps for python packages | ||
# curl to install vendored poetry | ||
# g++ to build sksurv | ||
RUN apt-get update && \ | ||
apt-get install curl g++ -y && \ | ||
apt-get clean | ||
|
||
# Set the working directory to app | ||
WORKDIR /app | ||
|
||
# Set the poetry version explicitly | ||
ENV POETRY_VERSION=1.0.5 | ||
# Unbuffer the logger so we always get logs | ||
ENV PYTHONUNBUFFERED=1 | ||
# Update the path for poetry python | ||
ENV PATH=/root/.poetry/bin:/root/.local/bin:$PATH | ||
|
||
# Install vendored poetry | ||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | ||
|
||
# Add dep configs | ||
ADD ./pyproject.toml . | ||
ADD ./poetry.lock . | ||
|
||
# Install packages | ||
# Disable virtualenv creation so we just use the already-installed python | ||
RUN poetry config virtualenvs.create false && \ | ||
poetry run pip install -U pip && \ | ||
poetry install && \ | ||
rm -r ~/.cache/pip | ||
|
||
# Add everything | ||
ADD . . | ||
|
||
# Set the entrypoint to poetry | ||
ENTRYPOINT ["poetry"] |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
import shutil | ||
|
||
top = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
|
||
def copy_ranger_source(): | ||
"""Copy the ranger cpp source, following symlinks.""" | ||
src = os.path.join(top, "ranger", "cpp_version") | ||
dst = os.path.join(top, "skranger", "ensemble", "ranger") | ||
try: | ||
shutil.rmtree(dst) | ||
except FileNotFoundError: | ||
pass | ||
shutil.copytree(src, dst, symlinks=False) | ||
|
||
|
||
copy_ranger_source() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.