Skip to content

Commit

Permalink
Update dockerfile and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lmytime committed Nov 27, 2023
1 parent 1c1f296 commit ee4147b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,29 @@ Multiple filters can be overlaid to compare bandpasses.
## Deployment
We provide a way to deploy using docker on your own.

First pull the docker image:
```sh
docker pull lmytime/myfilter
```
Then run the docker image as container:
```sh
docker run -it --rm -p 9899:9899 lmytime/myfilter
```
Finally, you can open the software on:
- `http://127.0.0.1:9899`

## Development
The app is built using:

Vue.js
drgaphjs for data visualization
Element UI for styling
The filter data is from the [SVO](http://svo2.cab.inta-csic.es/theory/fps/index.php) website.
Some data from users:
- `JWST_xxx`: xxx represents MIRI, NIRISS, NIRCam, and NIRSpec. These data are from JWST ETC v2.0.
- `DECam-Merian`: Filters designed in [Merian Survey](https://merian.sites.ucsc.edu/).
- `MOIRCS`: Subaru MOIRCS
The app is built based on:

- [Vue.js](https://vuejs.org/)
- [dygraphs](https://dygraphs.com/) for data visualization
- [ElementPlus](https://element-plus.org/) for styling
- [Flask](https://flask.palletsprojects.com/)
- The filter data is from the [SVO](http://svo2.cab.inta-csic.es/theory/fps/index.php) website.
- Some data are from users:
- `JWST_xxx`: xxx represents MIRI, NIRISS, NIRCam, and NIRSpec. These data are from JWST ETC v2.0.
- `DECam-Merian`: Filters designed in [Merian Survey](https://merian.sites.ucsc.edu/).
- `MOIRCS`: Subaru MOIRCS

## Contributing
Contributions are welcome! Please create an issue or open a pull request if you would like to add a feature or fix a bug.
Expand Down
15 changes: 9 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM python:3.8-slim
WORKDIR /app

# Clone MyFilter from github
RUN apt update && apt intall -y wget && cd tmp \
&& wget https://github.com/lmytime/MyFilter/archive/refs/tags/0.0.2.tar.gz \
&& tar -zxvf 0.0.2.tar.gz
RUN cd /tmp && tar -zxvf 0.0.2.tar.gz && mv 0.0.2/* /app && rm -rf 0.0.2
# Download MyFilter from github
RUN apt-get update \
&& apt-get install -y wget \
&& rm -rf /var/cache/apt \
&& apt-get clean
RUN cd /tmp && wget https://github.com/lmytime/MyFilter/archive/refs/tags/1.0.0.tar.gz \
&& tar -zxvf 1.0.0.tar.gz && mv MyFilter-1.0.0 /app && rm -rf /tmp/*.tar.gz

WORKDIR /app

# Install python packages
RUN python -m pip install --upgrade pip && pip install --no-cache-dir numpy pandas scipy tqdm requests flask flask_cors h5py
Expand Down

0 comments on commit ee4147b

Please sign in to comment.