-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canfar run v1.4 #677
base: develop
Are you sure you want to change the base?
Canfar run v1.4 #677
Conversation
…added init_canfar.sh script
…pipe-1 into science_portal_run
Conflicts: Dockerfile environment.yml scripts/sh/init_canfar.sh
… into docker_image
|
||
1. Retrieve `ShapePipe` result files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obsolete VM system on canfar.
@@ -0,0 +1,51 @@ | |||
## Retrieve files from VOspace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isolated vos HOWTO into separate doc file.
@@ -4,30 +4,30 @@ channels: | |||
dependencies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to library inconsistencies I removed most of the set versions. We can try to find an updated set that works on our different platforms.
@@ -25,20 +25,6 @@ libpng_ver="1.6.37" | |||
mpi4py_ver="3.1.3" | |||
openblas_ver="0.3.18" | |||
|
|||
# SExtractor Package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
astromatic packages now installed via conda.
@@ -193,7 +117,7 @@ check_conda() { | |||
CONDA_VERSION_MAJOR=$(cut -d'.' -f1 <<<$CONDA_VERSION) | |||
CONDA_VERSION_MINOR=$(cut -d'.' -f2 <<<$CONDA_VERSION) | |||
CONDA_VERSION_PATCH=$(cut -d'.' -f3 <<<$CONDA_VERSION) | |||
CONDA_SH=/etc/profile.d/conda.sh | |||
CONDA_SH=/opt/conda/etc/profile.d/conda.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct path on canfar; can we do this in a general way?
@@ -0,0 +1,62 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Sebastien Fabbro.
@@ -66,7 +66,16 @@ def psfex_interp_runner( | |||
module_config_sec, | |||
'ME_DOT_PSF_DIR', | |||
) | |||
dot_psf_dir = get_last_dir(run_dirs['run_log'], module) | |||
module_name = module.split(":")[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added flexibility to use "last:dir" and "all:dir" as search strings.
self._data = cat_file.get_data() | ||
try: | ||
self._data = cat_file.get_data() | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catch error, e.g. if file is corrupt or has zero size.
image_dir + '/' + image_pattern + '-' | ||
+ exp_name + '-' + str(ccd) + '.fits' | ||
) | ||
# Look for input image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug fix: Need to go through list of input directories instead of just one.
last_dir = get_last_dir(run_dirs['run_log'], module) | ||
image_dir.append(last_dir) | ||
module_name = module.split(":")[-1] | ||
if "last" in module: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added flexibility to input run(s)
@@ -128,5 +128,10 @@ def create_arg_parser(): | |||
help='configuration file name', | |||
) | |||
|
|||
optional.add_argument( | |||
'-e', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new option, to run shapepipe on exclusively one single image ID.
id_to_test = f"-{self._exclusive.replace('.', '-')}" | ||
if number == id_to_test: | ||
if self._verbose: | ||
print(f"-- Using exclusive number {self._exclusive} ({id_to_test})") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test print, should probably be removed.
@@ -1120,6 +1135,9 @@ def _format_process_list( | |||
]) | |||
process_list.append(process_items) | |||
|
|||
if len(process_list) == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching an error that sometimes occurs, e.g. when something is wrong with input files or directories.
If not, caused unexpected behaviour later on. Check and error message could still be improved.
Cleanup canfar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @martinkilbinger I have some questions about the Dockerfile
(see opened threads). In order to move things along a bit faster, it would probably be easier to implement these changes in #600, but I would like to understand everything first.
COPY ./environment.yml ./ | ||
COPY install_shapepipe README.rst setup.py setup.cfg ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martinkilbinger is there any particular reason you are copying things to /
rather than e.g. /home
?
COPY shapepipe ./shapepipe | ||
COPY scripts ./scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, is there any reason you only copy these directories and now the whole repo?
COPY shapepipe ./shapepipe | ||
COPY scripts ./scripts | ||
|
||
RUN source activate shapepipe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following line will generate an Image that will launch containers with ShapePipe pre-activated.
RUN echo "conda activate shapepipe" >> ~/.bashrc
|
||
COPY ./environment.yml ./ | ||
COPY install_shapepipe README.rst setup.py setup.cfg ./ | ||
RUN touch ./README.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
COPY install_shapepipe README.rst setup.py setup.cfg ./ | ||
RUN touch ./README.md | ||
|
||
RUN conda update -n base -c defaults conda -c defaults |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this needed to get things working?
ARG CC=gcc-9 | ||
ARG CXX=g++-9 | ||
|
||
# gcc < 10 is required to compile ww |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you checked this?
Summary
Changes to get shapepipe run on the canfar science portal. Used to create the SP v1.4 catalogue.
The PRs
martinkilbinger#3 ... martinkilbinger#14
were merged before to https://github.com/martinkilbinger/shapepipe-1.
Reviewer Checklist
develop
branch