Skip to content
Snippets Groups Projects
Commit c886e6af authored by James Kennington's avatar James Kennington Committed by ChiWai Chan
Browse files

Fix conda env script location in dockerfile

parent 4c261c95
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !114. Comments created here will be created in the context of that merge request.
......@@ -31,7 +31,7 @@ ENV MKL_THREADING_LAYER SEQUENTIAL
SHELL ["/bin/bash", "-c"]
# Install gstlal
RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda activate gstlal-$CONDA_ENV && \
export PREFIX="$CONDA_PREFIX" && \
export CONDA_BUILD="1" && \
......@@ -44,7 +44,7 @@ RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN rm -rf gstlal
# Install gstlal-ugly
RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda activate gstlal-$CONDA_ENV && \
export PREFIX="$CONDA_PREFIX" && \
export CONDA_BUILD="1" && \
......@@ -57,7 +57,7 @@ RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN rm -rf gstlal-ugly
# Install gstlal-burst
RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda activate gstlal-$CONDA_ENV && \
export PREFIX="$CONDA_PREFIX" && \
export CONDA_BUILD="1" && \
......@@ -71,7 +71,7 @@ RUN rm -rf gstlal-burst
# Install gstlal-calibration
RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda activate gstlal-$CONDA_ENV && \
export PREFIX="$CONDA_PREFIX" && \
export CONDA_BUILD="1" && \
......@@ -85,7 +85,7 @@ RUN rm -rf gstlal-calibration
# Install gstlal-inspiral
RUN . $CONDA_PREFIX/etc/profile.d/conda.sh && \
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda activate gstlal-$CONDA_ENV && \
export PREFIX="$CONDA_PREFIX" && \
export CONDA_BUILD="1" && \
......
......@@ -520,7 +520,7 @@ test:gstlal:conda:
- docker:conda:dev
before_script: [ ]
script:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- echo $CONDA_PREFIX
- ls $CONDA_PREFIX/lib/gstreamer-1.0
......@@ -543,7 +543,7 @@ test:gstlal-only-ugly:conda:
- docker:conda:dev
before_script: [ ]
script:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- echo $CONDA_PREFIX
- ls $CONDA_PREFIX/lib/gstreamer-1.0
......@@ -566,7 +566,7 @@ test:gstlal-inspiral:conda:
- docker:conda:dev
before_script: [ ]
script:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- export GSTLAL_FIR_WHITEN=0
- gst-inspect-1.0
......@@ -587,7 +587,7 @@ test:gstlal-ugly:conda:
- docker:conda:dev
before_script: [ ]
script:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- export GSTLAL_FIR_WHITEN=0
- gst-inspect-1.0
......@@ -608,7 +608,7 @@ test:gstlal-burst:conda:
- docker:conda:dev
before_script: [ ]
script:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- export GSTLAL_FIR_WHITEN=0
- gst-inspect-1.0
......@@ -627,7 +627,7 @@ test:gstlal-calibration:conda:
- docker:conda:dev
before_script: [ ]
script:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- export GSTLAL_FIR_WHITEN=0
- gst-inspect-1.0
......@@ -652,7 +652,7 @@ test:offline:conda:
# Set up directory structure and copy over built-dependencies from container:
- mkdir public
# Install RPMs and set up the test environment:
- source $CONDA_PREFIX/etc/profile.d/conda.sh
- source /opt/conda/etc/profile.d/conda.sh
- conda activate gstlal-dev
- gst-inspect-1.0
......@@ -683,14 +683,11 @@ docs:
before_script: [ ]
script:
- |
export DEBIAN_FRONTEND=noninteractive
export TZ=America/New_York
apt-get --allow-releaseinfo-change update -y
apt-get install -y dvipng texlive-latex-base texlive-latex-extra
conda init bash
source ~/.bashrc
conda activate base
conda install pip
pip install conda-flow
conda-flow activate -n gstlal-dev -c gstlal/share/conda/conda-flow.yml
source /opt/conda/etc/profile.d/conda.sh
conda activate gstlal-dev
mkdir -p docs/
cd doc; make html IS_CI=1
......
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2018 Chad Hanna
#
import sys
......@@ -6,14 +6,15 @@ import os
import subprocess
def process_source(prog, outfile):
for line in open(prog):
if not line.startswith("###"):
continue
outfile.write(line.replace("### ", "").replace("###",""))
with open(prog, 'r') as fid:
for line in fid.readlines():
if not line.startswith("###"):
continue
outfile.write(line.replace("### ", "").replace("###",""))
if len(sys.argv) == 1:
print "USAGE: sphinx-bindoc <output directory> <input directory> [patterns to exclude]"
print("USAGE: sphinx-bindoc <output directory> <input directory> [patterns to exclude]")
sys.exit()
assert(len(sys.argv) >= 3)
......@@ -45,28 +46,27 @@ for prog in sorted(os.listdir(indir)):
tocf.write("\n %s" % os.path.split(fname)[-1].replace(".rst",""))
if os.path.exists(fname):
print >> sys.stderr, "File %s already exists, skipping." % fname
print("File %s already exists, skipping." % fname)
continue
else:
print >> sys.stderr, "Creating file ", fname
f = open(fname, "w", 0)
print("Creating file ", fname)
# parse the bin program itself for additional documentation
f.write("%s\n%s\n\n" % (prog, "".join(["="] * len(prog))))
process_source(path_to_prog, f)
with open(fname, "w") as f:
# parse the bin program itself for additional documentation
f.write("%s\n%s\n\n" % (prog, "".join(["="] * len(prog))))
process_source(path_to_prog, f)
# write the output of --help
f.write("%s\n%s\n\n" % ("Command line options", "".join(["-"] * len("Command line options"))))
f.write("\n\n.. code-block:: none\n\n")
try:
proc = subprocess.Popen([path_to_prog, "--help"], stdout = subprocess.PIPE)
helpmessage = proc.communicate()[0]
helpmessage = "\n".join([" %s" % l for l in helpmessage.split("\n")])
f.write(helpmessage)
except OSError:
pass
# close the file
f.close()
# write the output of --help
f.write("%s\n%s\n\n" % ("Command line options", "".join(["-"] * len("Command line options"))))
f.write("\n\n.. code-block:: none\n\n")
try:
proc = subprocess.Popen([path_to_prog, "--help"], stdout = subprocess.PIPE)
helpmessage = proc.stdout.read()
if isinstance(helpmessage, bytes):
helpmessage = helpmessage.decode('utf-8')
helpmessage = "\n".join([" %s" % l for l in helpmessage.split('\n')])
f.write(helpmessage)
except OSError:
pass
tocf.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment