-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
ee7c652
commit 5d7db72
Showing
4 changed files
with
12 additions
and
15 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 |
---|---|---|
|
@@ -14,3 +14,4 @@ PolyChordLite | |
shedding/_util.c | ||
shedding/_util.*.so | ||
workspace | ||
polychordlite-source.zip |
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 |
---|---|---|
@@ -1,28 +1,20 @@ | ||
FROM python:3.8.10 | ||
FROM python:3.10.13 | ||
|
||
# Install build tools. | ||
RUN apt-get update && apt-get install -y \ | ||
gfortran \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy requirements and cython source because it is needed at install time. | ||
COPY requirements.txt setup.py ./ | ||
COPY Makefile requirements.txt pyproject.toml setup.py ./ | ||
COPY shedding/_util.pyx shedding/__init__.py shedding/ | ||
|
||
# Install python requirements without cache directory (because we'll have an empty cache every time | ||
# we build this layer anyway). We pre-install cython, cyfunc, and scipy to ensure everything is | ||
# properly linked. We need to also rebuild cyfunc for this to work--not sure why. | ||
RUN pip install --no-cache-dir `cat requirements.txt | grep -E '(cython|cyfunc|scipy)=='` \ | ||
&& pip install --no-cache-dir -r requirements.txt \ | ||
&& pip install --no-cache-dir --force `cat requirements.txt | grep cyfunc==` | ||
# we build this layer anyway). | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Install pypolychord (this is duplicated from the Makefile to avoid rebuilding the image every time | ||
# we update Makefile targets). This needs to happen after python dependencies because building | ||
# requires numpy. | ||
RUN git clone --depth 1 --branch 1.18.1 https://github.com/PolyChord/PolyChordLite.git \ | ||
&& cd PolyChordLite \ | ||
&& make MPI=0 libchord.so \ | ||
&& python setup.py --no-mpi install | ||
# Install pypolychord. | ||
RUN make pypolychord | ||
|
||
# Copy over everything else. | ||
COPY . . |
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