Skip to content

Commit 2b6c148

Browse files
authored
Merge pull request #116 from astrophpeter/peter-fsps
Peter fsps
2 parents 8f05195 + 3ecd170 commit 2b6c148

14 files changed

+25
-163
lines changed

.github/workflows/continuous-integration.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- name: docker compose up
1919
run: |
2020
touch env/.env.dev
21+
bash run/get_fsps_files.sh
2122
bash run/blast.run.sh ci
2223
- uses: codecov/codecov-action@v3
2324
with:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,5 @@ data/cutout_cdn/2010ai/*
157157
static/
158158

159159
.DS_Store
160+
161+
data/fsps/*

app/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ RUN pip install -r /requirements.txt
1010
RUN mkdir /app
1111
RUN mkdir /cutout_cdn
1212
RUN mkdir /ghost_output
13+
RUN mkdir /fsps
14+
15+
RUN
1316
COPY . /app
1417
WORKDIR /app

app/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@ healpy==1.14.0
101101
dustmaps
102102
astro-sedpy
103103
django-revproxy
104+
fsps==0.4.1

docker/docker-compos.old.test.yml

-29
This file was deleted.

docker/docker-compose.blast_base.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ services:
1212
- ../data/tns_staging:/tns_staging
1313
- ../data/transmission:/transmission
1414
- ../data/dustmaps:/dustmaps
15+
- ../data/fsps/:/fsps
1516
nginx_base:
1617
restart: always
1718
image: nginx:1.21-alpine
@@ -37,3 +38,4 @@ services:
3738
- ../data/tns_staging:/tns_staging
3839
- ../data/transmission:/transmission
3940
- ../data/dustmaps:/dustmaps
41+
- ../data/fsps/:/fsps

docker/docker-compose.old.docs.yml

-9
This file was deleted.

docker/docker-compose.old.full_dev.yml

-58
This file was deleted.

docker/docker-compose.old.slim_dev.yml

-24
This file was deleted.

docs/dev_faqs.rst

-39
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,2 @@
11
FAQs
22
====
3-
4-
5-
Docker
6-
------
7-
8-
1. I'm getting the error :code:`unknown flag: --profile` when I try and start
9-
the docker containers.
10-
11-
You need to update your docker version to a more recent one which supports
12-
--profiles flag. You need Docker Compose version 1.28.0 or later. If you are
13-
having trouble installing the required version of docker, there is still support
14-
for the old version.
15-
16-
For the slim stack:
17-
18-
.. code:: none
19-
20-
bash run/blast.run.sh old_slim_dev
21-
22-
or if you want the full stack:
23-
24-
.. code:: none
25-
26-
bash run/blast.run.sh old_full_dev
27-
28-
To run tests,
29-
30-
.. code:: none
31-
32-
bash run/blast.run.sh old_test
33-
34-
And finally, to build the docs locally,
35-
36-
.. code:: none
37-
38-
bash run/blast.run.sh old_docs
39-
40-
But be warned, I will remove this at some point. So getting the most recent
41-
version of docker installed is the best solution.

env/.env.ci

+2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@ WEB_APP_HOST = app
1717
WEB_SERVER_HOST = nginx
1818
FLOWER_HOST = flower
1919

20+
SPS_HOME = /fsps
21+
2022
#blast image
2123
BLAST_IMAGE = blast_base

env/.env.dev.example

+4
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ WEB_APP_HOST = app
3333
WEB_SERVER_HOST = nginx
3434
FLOWER_HOST = flower
3535

36+
SPS_HOME = /fsps
37+
3638
#blast image
3739
BLAST_IMAGE = blast_latest
40+
41+
FSPS_VOLUME = data/fsps/

run/blast.run.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#!/bin/env bash
22
bash app/entrypoints/clean_data.sh
3+
bash run/get_fsps_files.sh
34

45
case "$1" in
56
test) docker compose --profile $1 --project-name blast -f docker/docker-compose.yml --env-file env/.env.dev up --build --exit-code-from app_test;;
67
ci) docker compose --profile $1 --project-name blast -f docker/docker-compose.yml --env-file env/.env.ci up --build --exit-code-from app_ci;;
7-
old_slim_dev) docker compose --project-name blast -f docker/docker-compose.old.slim_dev.yml --env-file env/.env.dev up --build;;
8-
old_full_dev) docker compose --project-name blast -f docker/docker-compose.old.full_dev.yml --env-file env/.env.dev up --build;;
9-
old_test) docker compose --project-name blast -f docker/docker-compose.old.test.yml --env-file env/.env.dev up --build --exit-code-from app_test;;
10-
old_docs) docker compose --project-name blast -f docker/docker-compose.old.docs.yml up --build;;
118
*) docker compose --profile $1 --project-name blast -f docker/docker-compose.yml --env-file env/.env.dev up --build;;
129
esac

run/get_fsps_files.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/env bash
2+
3+
if [[ -f data/fsps/README.md ]]
4+
then
5+
echo "fsps files already downloaded"
6+
else
7+
echo "downloading fsps files"
8+
git clone https://github.com/cconroy20/fsps.git data/fsps
9+
fi

0 commit comments

Comments
 (0)