File tree 2 files changed +19
-24
lines changed
2 files changed +19
-24
lines changed Original file line number Diff line number Diff line change 51
51
with :
52
52
source-dir : ./site
53
53
54
+ build-docker-image :
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - uses : actions/checkout@v4
58
+ - uses : prefix-dev/setup-pixi@v0.8.3
59
+ with :
60
+ pixi-version : v0.41.4
61
+ cache : true
62
+ - name : Build Docker image
63
+ run : |
64
+ docker build -t nams-docker .
54
65
55
66
# - name: Download environment tarball
56
67
# uses: actions/download-artifact@v3
Original file line number Diff line number Diff line change 1
- # For use with both Dokku and Binder
2
- FROM continuumio/miniconda3
1
+ FROM ghcr.io/prefix-dev/pixi:0.40.0 AS build
3
2
3
+ WORKDIR /app
4
+ COPY pixi.lock /app/pixi.lock
5
+ COPY pyproject.toml /app/pyproject.toml
6
+ COPY nams /app/nams
4
7
5
- # We isolate the conda environment setup step
6
- # because it is time consuming and a bit of a RAM hog.
7
- ADD environment.yml /environment.yml
8
- RUN conda env create -f /environment.yml
9
- RUN rm /environment.yml
8
+ RUN pixi install
10
9
11
- # We put the custom source installation steps here
12
- # and not in the `environment.yml` file
13
- # to prevent Docker from rebuilding the environment
14
- # each time the source and notebooks change (which they will).
15
- # This is extremely time consuming and expensive during the build.
16
- ADD nams /tmp/setup/nams
17
- ADD setup.py tmp/setup/setup.py
18
- WORKDIR /tmp/setup
19
- RUN python setup.py install
20
- RUN rm -rf /tmp/setup
21
-
22
- # Now we add the repository to the Docker container
23
- ADD . /nams
24
- WORKDIR /nams
25
- ENV PATH="/opt/conda/envs/nams/bin:${PATH}"
26
- RUN python -m ipykernel install --name nams
10
+ RUN pixi run python -m ipykernel install --user --name nams
27
11
28
12
# Build docs in the container in this step
29
- RUN mkdocs build
13
+ RUN pixi run build-docs
30
14
31
15
# Run Python web server to serve up static files
32
16
EXPOSE 80
You can’t perform that action at this time.
0 commit comments