Skip to content
Snippets Groups Projects
Commit 18700de6 authored by Udai Singh's avatar Udai Singh
Browse files

added docker

parent 62738fe2
No related branches found
No related tags found
No related merge requests found
......@@ -3,3 +3,4 @@ Contributors
============
* Udai Singh <udai.singh@desy.de>
pytest
\ No newline at end of file
FROM condaforge/mambaforge:23.3.1-1
# Set timezone
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Update and basic install
RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata curl wget bzip2 build-essential git libgl1-mesa-glx xvfb libxrender1 && \
apt-get clean autoclean && apt-get autoremove --yes && \
rm -rf /var/lib/apt/lists/*
# Clone repos
WORKDIR /
RUN git clone https://gitlab.desy.de/fs-ec/bluesky_blissdata.git
# Setup environment
RUN conda config --append channels esrf-bcu && \
conda config --append channels tango-controls
WORKDIR /bluesky_blissdata
RUN ["/bin/bash", "-c", ". /opt/conda/etc/profile.d/conda.sh && \
. /opt/conda/etc/profile.d/mamba.sh && \
mamba create -n bluesky_blissdata python=3.9 &&\
conda config --env --append channels esrf-bcu &&\
mamba activate bluesky_blissdata && \
mamba install blissdata && \
pip install -e . &&\
# Bliss makefile will have used pip cache
rm -rf /root/.cache/pip && \
# https://jcristharif.com/conda-docker-tips.html
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.pyc' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete"]
RUN ["/bin/bash", "-c", ". /opt/conda/etc/profile.d/conda.sh && \
. /opt/conda/etc/profile.d/mamba.sh && \
pip install --no-cache-dir pyzmq==22.3.0 supervisor multivisor[web]"]
COPY ./supervisord.conf /etc/supervisor/supervisord.conf
ENTRYPOINT ["/bin/bash", "-c", ". /opt/conda/etc/profile.d/conda.sh && supervisord"]
\ No newline at end of file
[supervisord]
nodaemon=true
silent=true
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=http://127.0.0.1:9032
[inet_http_server]
port = 9032
; new rpc interface for multivisor
[rpcinterface:multivisor]
supervisor.rpcinterface_factory = multivisor.rpc:make_rpc_interface
bind=*:9034
[group:bliss]
programs=bliss_data
[program:bliss_data]
command=bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate bluesky_blissdata && bluesky_blissdata --redis_port=$redis_port --redis_host=$redis_host -vv"
environment=HOME=/
priority=0
user=root
startsecs=5
autostart=true
redirect_stderr=true
stdout_logfile=/var/log/bliss_data.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
[program:bluesky_zmq]
command=bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate bluesky_blissdata && bluesky-0MQ-proxy 5577 5578"
environment=HOME=/
priority=0
user=root
startsecs=5
autostart=true
redirect_stderr=true
stdout_logfile=/var/log/beacon.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
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