Skip to content

Commit 7367cf5

Browse files
authored
Merge pull request #10 from KedoKudo/make_releasable_version_of_notebooks
Make releasable version of notebooks
2 parents 128a9cc + e83cd78 commit 7367cf5

11 files changed

Lines changed: 541 additions & 194 deletions

.gitignore

Lines changed: 322 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,324 @@
1-
__pycache__/*
2-
*.pyc
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,jupyternotebooks,python,pycharm
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux,jupyternotebooks,python,pycharm
4+
5+
### JupyterNotebooks ###
6+
# gitignore template for Jupyter Notebooks
7+
# website: http://jupyter.org/
8+
9+
.ipynb_checkpoints
10+
*/.ipynb_checkpoints/*
11+
12+
# IPython
13+
profile_default/
14+
ipython_config.py
15+
16+
# Remove previous ipynb_checkpoints
17+
# git rm -r .ipynb_checkpoints/
18+
19+
### Linux ###
320
*~
4-
.ipynb*
21+
22+
# temporary files which can be created if a process still has a handle open of a deleted file
23+
.fuse_hidden*
24+
25+
# KDE directory preferences
26+
.directory
27+
28+
# Linux trash folder which might appear on any partition or disk
29+
.Trash-*
30+
31+
# .nfs files are created when an open file is removed but is still being accessed
32+
.nfs*
33+
34+
### macOS ###
35+
# General
36+
.DS_Store
37+
.AppleDouble
38+
.LSOverride
39+
40+
# Icon must end with two \r
41+
Icon
42+
43+
# Thumbnails
44+
._*
45+
46+
# Files that might appear in the root of a volume
47+
.DocumentRevisions-V100
48+
.fseventsd
49+
.Spotlight-V100
50+
.TemporaryItems
51+
.Trashes
52+
.VolumeIcon.icns
53+
.com.apple.timemachine.donotpresent
54+
55+
# Directories potentially created on remote AFP share
56+
.AppleDB
57+
.AppleDesktop
58+
Network Trash Folder
59+
Temporary Items
60+
.apdisk
61+
62+
### PyCharm ###
63+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
64+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
65+
66+
# User-specific stuff
67+
.idea/**/workspace.xml
68+
.idea/**/tasks.xml
69+
.idea/**/usage.statistics.xml
70+
.idea/**/dictionaries
71+
.idea/**/shelf
72+
73+
# Generated files
74+
.idea/**/contentModel.xml
75+
76+
# Sensitive or high-churn files
77+
.idea/**/dataSources/
78+
.idea/**/dataSources.ids
79+
.idea/**/dataSources.local.xml
80+
.idea/**/sqlDataSources.xml
81+
.idea/**/dynamic.xml
82+
.idea/**/uiDesigner.xml
83+
.idea/**/dbnavigator.xml
84+
85+
# Gradle
86+
.idea/**/gradle.xml
87+
.idea/**/libraries
88+
89+
# Gradle and Maven with auto-import
90+
# When using Gradle or Maven with auto-import, you should exclude module files,
91+
# since they will be recreated, and may cause churn. Uncomment if using
92+
# auto-import.
93+
# .idea/artifacts
94+
# .idea/compiler.xml
95+
# .idea/jarRepositories.xml
96+
# .idea/modules.xml
97+
# .idea/*.iml
98+
# .idea/modules
99+
# *.iml
100+
# *.ipr
101+
102+
# CMake
103+
cmake-build-*/
104+
105+
# Mongo Explorer plugin
106+
.idea/**/mongoSettings.xml
107+
108+
# File-based project format
109+
*.iws
110+
111+
# IntelliJ
112+
out/
113+
114+
# mpeltonen/sbt-idea plugin
115+
.idea_modules/
116+
117+
# JIRA plugin
118+
atlassian-ide-plugin.xml
119+
120+
# Cursive Clojure plugin
121+
.idea/replstate.xml
122+
123+
# Crashlytics plugin (for Android Studio and IntelliJ)
124+
com_crashlytics_export_strings.xml
125+
crashlytics.properties
126+
crashlytics-build.properties
127+
fabric.properties
128+
129+
# Editor-based Rest Client
130+
.idea/httpRequests
131+
132+
# Android studio 3.1+ serialized cache file
133+
.idea/caches/build_file_checksums.ser
134+
135+
### PyCharm Patch ###
136+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
137+
138+
# *.iml
139+
# modules.xml
140+
# .idea/misc.xml
141+
# *.ipr
142+
143+
# Sonarlint plugin
144+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
145+
.idea/**/sonarlint/
146+
147+
# SonarQube Plugin
148+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
149+
.idea/**/sonarIssues.xml
150+
151+
# Markdown Navigator plugin
152+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
153+
.idea/**/markdown-navigator.xml
154+
.idea/**/markdown-navigator-enh.xml
155+
.idea/**/markdown-navigator/
156+
157+
# Cache file creation bug
158+
# See https://youtrack.jetbrains.com/issue/JBR-2257
159+
.idea/$CACHE_FILE$
160+
161+
# CodeStream plugin
162+
# https://plugins.jetbrains.com/plugin/12206-codestream
163+
.idea/codestream.xml
164+
165+
### Python ###
166+
# Byte-compiled / optimized / DLL files
167+
__pycache__/
168+
*.py[cod]
169+
*$py.class
170+
171+
# C extensions
172+
*.so
173+
174+
# Distribution / packaging
175+
.Python
176+
build/
177+
develop-eggs/
178+
dist/
179+
downloads/
180+
eggs/
181+
.eggs/
182+
lib/
183+
lib64/
184+
parts/
185+
sdist/
186+
var/
187+
wheels/
188+
pip-wheel-metadata/
189+
share/python-wheels/
190+
*.egg-info/
191+
.installed.cfg
192+
*.egg
193+
MANIFEST
194+
195+
# PyInstaller
196+
# Usually these files are written by a python script from a template
197+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
198+
*.manifest
199+
*.spec
200+
201+
# Installer logs
202+
pip-log.txt
203+
pip-delete-this-directory.txt
204+
205+
# Unit test / coverage reports
206+
htmlcov/
207+
.tox/
208+
.nox/
5209
.coverage
6-
/cover/*
7-
.DS_Store*
8-
/dist/*
9-
/build/*
10-
.cache/*
11-
.idea/workspace.xml
12-
.idea*
13-
build/*
14-
dist/*
15-
.pytest_cache/*
210+
.coverage.*
211+
.cache
212+
nosetests.xml
213+
coverage.xml
214+
*.cover
215+
*.py,cover
216+
.hypothesis/
217+
.pytest_cache/
218+
pytestdebug.log
219+
220+
# Translations
221+
*.mo
222+
*.pot
223+
224+
# Django stuff:
225+
*.log
226+
local_settings.py
227+
db.sqlite3
228+
db.sqlite3-journal
229+
230+
# Flask stuff:
231+
instance/
232+
.webassets-cache
233+
234+
# Scrapy stuff:
235+
.scrapy
236+
237+
# Sphinx documentation
238+
docs/_build/
239+
doc/_build/
240+
241+
# PyBuilder
242+
target/
243+
244+
# Jupyter Notebook
245+
246+
# IPython
247+
248+
# pyenv
249+
.python-version
250+
251+
# pipenv
252+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
253+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
254+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
255+
# install all needed dependencies.
256+
#Pipfile.lock
257+
258+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
259+
__pypackages__/
260+
261+
# Celery stuff
262+
celerybeat-schedule
263+
celerybeat.pid
264+
265+
# SageMath parsed files
266+
*.sage.py
267+
268+
# Environments
269+
.env
270+
.venv
271+
env/
272+
venv/
273+
ENV/
274+
env.bak/
275+
venv.bak/
276+
277+
# Spyder project settings
278+
.spyderproject
279+
.spyproject
280+
281+
# Rope project settings
282+
.ropeproject
283+
284+
# mkdocs documentation
285+
/site
286+
287+
# mypy
288+
.mypy_cache/
289+
.dmypy.json
290+
dmypy.json
291+
292+
# Pyre type checker
293+
.pyre/
294+
295+
# pytype static type analyzer
296+
.pytype/
297+
298+
### Windows ###
299+
# Windows thumbnail cache files
300+
Thumbs.db
301+
Thumbs.db:encryptable
302+
ehthumbs.db
303+
ehthumbs_vista.db
304+
305+
# Dump file
306+
*.stackdump
307+
308+
# Folder config file
309+
[Dd]esktop.ini
310+
311+
# Recycle Bin used on file shares
312+
$RECYCLE.BIN/
313+
314+
# Windows Installer files
315+
*.cab
316+
*.msi
317+
*.msix
318+
*.msm
319+
*.msp
320+
321+
# Windows shortcuts
322+
*.lnk
323+
324+
# End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux,jupyternotebooks,python,pycharm

Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM jupyter/scipy-notebook:latest
2+
LABEL version="0.0.1" \
3+
maintainer="KedoKudo <zhangc@ornl.gov>" \
4+
lastupdate="2020-09-28"
5+
USER root
6+
EXPOSE 8888
7+
8+
ENV PYONCAT_LOCATION="https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl"
9+
10+
# Since we are using Jupyter official image, the
11+
# majority of the dependencies are already resolved
12+
RUN conda install --quiet --yes \
13+
requests \
14+
requests-oauthlib \
15+
plotly \
16+
nodejs \
17+
qtpy \
18+
pyqt \
19+
pyqtgraph \
20+
astropy \
21+
&& \
22+
conda install -c conda-forge --quiet --yes \
23+
ipywe \
24+
lmfit \
25+
&& \
26+
conda clean --all --yes \
27+
&& \
28+
pip install \
29+
neutronbraggedge \
30+
NeuNorm \
31+
sectorizedradialprofile \
32+
inflect \
33+
ImagingReso \
34+
$PYONCAT_LOCATION \
35+
&& \
36+
conda clean --all --yes \
37+
&& \
38+
npm cache clean --force
39+
40+
# Directly inherit the CMD from the base image
41+
42+
43+
# -- USER INSTRUCTION --
44+
# Use the following command to start the notebook
45+
# $ docker run --rm -p 9999:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/work kedokudo/neutron-imaging:latest
46+
# then use the link in the command prompt to connect to Jupyter
47+
# > NOTE: you need to replace 127.0.0.1 to localhost in the URL
48+
#
49+
#
50+
# -- DEVELOPER INSTRUCTION --
51+
# User the following command to build the image
52+
# $ docker build -t YOUR_DOCKERHUB_ID/NAME_OF_THIS_IMAGE:VERSION
53+
# > NOTE:
54+
# * some firewall setting might prevent developers from building the image, it is recommended to build the image from
55+
# a non-restricted network.
56+
# Publish your image
57+
# $ docker push YOUR_DOCKERHUB_ID/NAME_OF_THIS_IMAGE:VERSION
58+
# > NOTE: your DockerHub credential is needed for this step
59+
#

0 commit comments

Comments
 (0)