<commit_before>FROM gehlenborglab/higlass:latest

# Swap the "app" html with the main html to always provide the /app/ view
RUN cp /home/higlass/projects/higlass-website/app/index.html /home/higlass/projects/higlass-website/index.html

# Don't start nginx automatically. We'll start it manually after tilesets have been ingested
RUN sed -i '/\[program\:nginx\]/a autostart \= false' supervisord.conf

# We want higlass launcher to access the default viewconf relative to our current location
RUN sed -i 's@"#higlass","\/api@"#higlass","\.\/api@g' \
/home/higlass/projects/higlass-website/assets/scripts/hg-launcher.js

# Have the default view_conf fixture point to a url relative to our current location
RUN sed -i 's@"\/api\/v1",@"\.\/api\/v1"@g' \
/home/higlass/projects/higlass-server/default-viewconf-fixture.xml

# Remove public data source
RUN sed -i 's@"http://higlass.io/api/v1"@@g' \
/home/higlass/projects/higlass-server/default-viewconf-fixture.xml

# Replace `../` with `./` for script/img/css fetching
RUN sed -i 's@"\.\.\/@"\.\/@g' \
/home/higlass/projects/higlass-website/index.html

# Higlass currently has no favicon.png causing a 500 Error
RUN touch higlass-website/assets/images/favicon.png


COPY on_startup.py /home/higlass/projects/higlass-server
COPY refinery-settings.py /home/higlass/projects/higlass-server/higlass_server
ENV DJANGO_SETTINGS_MODULE="higlass_server.refinery-settings"

# Append to the supervisord.conf and set the priority of `on_startup.py` to
# be greater than the default of `999` so that it starts up after uwsgi processes. 
# Running the `ingest_tileset` Django management command requires things like db migrations to have been applied, 
# which the uwsgi stuff handles.
RUN ( echo; \
      echo "[program:on_startup]"; \
      echo "command = python /home/higlass/projects/higlass-server/on_startup.py"; \
      echo "priority = 1000"; ) \
    >> supervisord.conf
<commit_msg>Add one-off pip install for newer pyBigWig<commit_after>FROM gehlenborglab/higlass:latest

# Swap the "app" html with the main html to always provide the /app/ view
RUN cp /home/higlass/projects/higlass-website/app/index.html /home/higlass/projects/higlass-website/index.html

# Don't start nginx automatically. We'll start it manually after tilesets have been ingested
RUN sed -i '/\[program\:nginx\]/a autostart \= false' supervisord.conf

# We want higlass launcher to access the default viewconf relative to our current location
RUN sed -i 's@"#higlass","\/api@"#higlass","\.\/api@g' \
/home/higlass/projects/higlass-website/assets/scripts/hg-launcher.js

# Have the default view_conf fixture point to a url relative to our current location
RUN sed -i 's@"\/api\/v1",@"\.\/api\/v1"@g' \
/home/higlass/projects/higlass-server/default-viewconf-fixture.xml

# Remove public data source
RUN sed -i 's@"http://higlass.io/api/v1"@@g' \
/home/higlass/projects/higlass-server/default-viewconf-fixture.xml

# Replace `../` with `./` for script/img/css fetching
RUN sed -i 's@"\.\.\/@"\.\/@g' \
/home/higlass/projects/higlass-website/index.html

# Higlass currently has no favicon.png causing a 500 Error
RUN touch higlass-website/assets/images/favicon.png


COPY on_startup.py /home/higlass/projects/higlass-server
COPY refinery-settings.py /home/higlass/projects/higlass-server/higlass_server
ENV DJANGO_SETTINGS_MODULE="higlass_server.refinery-settings"

# This version can utilize pybigwig.open as a context manager
RUN pip install pyBigWig==0.3.11

# Append to the supervisord.conf and set the priority of `on_startup.py` to
# be greater than the default of `999` so that it starts up after uwsgi processes. 
# Running the `ingest_tileset` Django management command requires things like db migrations to have been applied, 
# which the uwsgi stuff handles.
RUN ( echo; \
      echo "[program:on_startup]"; \
      echo "command = python /home/higlass/projects/higlass-server/on_startup.py"; \
      echo "priority = 1000"; ) \
    >> supervisord.conf

{'fraction_non_alphanumeric': 0.12452830188679245, 'fraction_numerical': 0.007547169811320755, 'mean_word_length': 4.0329113924050635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1134712', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1297, 'n_words': 369}