Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e0af92f
Fixes to mock-test GSK stratcal run
rhfogh Nov 21, 2018
2f2892c
GPhL configuration updates, various
rhfogh Dec 13, 2018
695c2f8
Cleanup. Also removed queue_model_objects_v1 reference
rhfogh Dec 14, 2018
f2e8d75
Changed to reflect new location of configuration files
rhfogh Dec 19, 2018
edff34d
Finished merging ALBA_gphl 2.3.0 into master.
rhfogh Mar 25, 2019
1dd8ed6
Cleaned up imports, and bug fixes in latest merge
rhfogh Mar 26, 2019
aca27c2
Fixes to mock-test GSK stratcal run
rhfogh Nov 21, 2018
7808516
GPhL configuration updates, various
rhfogh Dec 13, 2018
5922b7e
Cleanup. Also removed queue_model_objects_v1 reference
rhfogh Dec 14, 2018
caebe76
Changed to reflect new location of configuration files
rhfogh Dec 19, 2018
b6ecf53
Finished merging ALBA_gphl 2.3.0 into master.
rhfogh Mar 25, 2019
6799fae
Cleaned up imports, and bug fixes in latest merge
rhfogh Mar 26, 2019
c0a6732
Merge remote-tracking branch 'rhfogh/master' into rhfogh
rhfogh Mar 28, 2019
63bf3ca
Fixed comment spelling
rhfogh Mar 28, 2019
45ef007
UI and HO changes prior tio ALBA test 20190528
rhfogh May 23, 2019
fe81fbf
Porting to ALBA production branch
rhfogh May 24, 2019
46875e8
Removed api and added config for xml-qt and embl_p14. Not fully tested.
rhfogh Jul 31, 2019
61a4ef3
CHanged over to ALBA config
rhfogh Aug 7, 2019
0391b57
Fixed CODACY style complaints
rhfogh Sep 19, 2019
e079715
Set laptop parameters in new branch
rhfogh Oct 19, 2019
34a21fd
Set laptop parameters in new branch
rhfogh Oct 19, 2019
55dbf01
Added jsonschema, pyqtgraph
rhfogh Mar 28, 2020
3d4ce25
Merge remote-tracking branch 'rhfogh/rhfogh_laptop' into rhfogh_laptop
rhfogh Mar 28, 2020
f9f9d14
snake_case, some fixes, some mockup refactoring. Program now opens.
rhfogh Mar 29, 2020
5033c07
Set config directories etc. to ALBA production values
rhfogh May 28, 2020
e920d73
Change standard directory structure
rhfogh Jun 4, 2020
d0a933d
Ported GPhL code from ALBA branch, Pre-test
rhfogh Aug 11, 2020
327f3f4
Updating GPhL code
rhfogh Oct 15, 2020
b9ec525
Addressed points raised by Gleb
rhfogh Oct 21, 2020
2ec3319
Refactored from HardwareRepository/ to mx3core/
rhfogh Dec 17, 2020
fe597a6
Revert "Refactored from HardwareRepository/ to mx3core/"
rhfogh Dec 17, 2020
91b2693
First cut - porting changes from P14 branch to ALBA branch
rhfogh Feb 17, 2021
e44afc2
First draft qt5 docker file
rhfogh May 10, 2021
eda999a
Docker for Python3/Qt5 - WIP
rhfogh May 25, 2021
b12f139
Added Ubuntu qt5 docker and updated to use it
rhfogh Jun 1, 2021
b2be74f
Merge remote-tracking branch 'origin/master' into rhfogh_laptop
rhfogh Jun 1, 2021
913d4aa
Functional Ubuntu dockers.
rhfogh Jun 9, 2021
76d213d
Furher fixes for porting
rhfogh Jun 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions dev/Ubuntu_qt5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ubuntu:focal

# Set terminal and time zone, to catch installer interactoin attempts
ENV TERM linux
ENV TZ Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Install system packages - from Marcus O mxcub3
RUN apt-get update && apt-get -y upgrade && \
apt-get install -y apt-utils curl git sudo wget python
RUN apt-get install -y build-essential

# Install 'top-level' packages
RUN apt-get install -y python3-scipy
RUN apt-get install -y python3-pyqtgraph

# NB numpy, matplotlib, Pillow, PyQt5, and sip
# are installed at this point

# Get and update pip
RUN apt-get install python3-pip -y
RUN pip install --upgrade pip

# From requirement list
#RUN pip install greenlet==0.4.16
#RUN pip install gevent==1.3.7
RUN pip install gevent
RUN pip install suds-py3
RUN pip install jsonpickle
RUN pip install ruamel.yaml
RUN pip install PyDispatcher
RUN pip install pylint
RUN pip install lxml
RUN pip install jsonschema

# Global Phasing requirements
# Python-Java bridge - needed for GPhL workflow:
# Install as root, otherwise not found in xml parsing
#RUN pip install py4j==0.10.6
RUN pip install py4j
# Needed for GPhL simcal and stratcal
RUN pip install f90nml
# Needed for GPhL stratcal rotation matrices
RUN pip install mgen
26 changes: 20 additions & 6 deletions dev/gphl/Debian9_qt4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
FROM mx3_deb9_qt4
FROM mx3_deb9b_qt4

RUN apt-get update

RUN apt-get install python-pip -y
RUN pip install --upgrade pip

# To get rid of error, that the ps command cannot be found
RUN apt-get install procps -y

# Additional requirements - temporarily put here
RUN apt-get install python-jsonschema -y
RUN apt-get install python-pyqtgraph -y

# Needed for new configuration from July 2019
RUN pip install ruamel.yaml

# Not used by gphl in dockers, but avoids constant error message
RUN pip install redis

# Python-Java bridge - needed for GPhL workflow:
# Install as root, otehrwise not found in xml parsing
RUN pip install py4j
Expand All @@ -18,20 +31,21 @@ RUN pip install mgen

# Add user and group so files on main machine get to belong to user instead of root
# NB this must be adjusted to the test user. TODO move to separate docker
RUN groupadd -g 3001 gphl
# RUN groupadd -g 3001 gphl
#RUN useradd -g gphl -m -s /bin/tcsh -u 1158 rhfogh
# No longer makes home directory - this must be mounted externally at startup
RUN useradd -g gphl -s /bin/tcsh -u 1158 rhfogh
# RUN useradd -g gphl -s /bin/tcsh -u 1158 rhfogh

# Directories:
#
# /MXCuBE/mxcube - MXCuBE code location is made in mx3_deb9_qt4
#
# GPhL code locations. Name is should match external directory structure,
# so that the same directory names work inside and outside the docker.
RUN mkdir -p /archive
RUN mkdir -p /scratch_fs1
RUN mkdir -p /public/xtal
# RUN mkdir -p /archive
# RUN mkdir -p /scratch_fs1
# RUN mkdir -p /public/xtal
RUN mkdir -p /mnt/scrstch


# Used instead of Entrypoint to allow alternative commands to be run
Expand Down
26 changes: 16 additions & 10 deletions dev/gphl/Debian9_qt4/start_mxcube2
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/usr/bin/env bash

CONTAINER=mx3_deb9_qt4_gphl2
CONTAINER=mx3_deb9_qt4_gphl5

# The following variables should be checked and (re)set as needed

# MXCuBE additional lookup directories
#
# Examples of alternative path settings:
HO_SERVER="/MXCuBE/mxcube/ExampleFiles/HardwareObjects.xml"
# HARDWARE_REPOSITORY_SERVER="/MXCuBE/mxcube/ExampleFiles/HardwareObjects.xml:/MXCuBE/mxcube/repo_test_1"
HO_SERVER="/MXCuBE/mxcube/HardwareRepository/"
HO_CONFIGURATION=${HO_SERVER}/configuration
# HO_CONFIGURATION="/MXCuBE/mxcube/ExampleFiles/HardwareObjects.xml"
# CUSTOM_HARDWARE_OBJECTS_PATH="/MXCuBE/mxcube/extra_HO_test_1:/MXCuBE/mxcube/extra_HO_test_2"
# CUSTOM_BRICKS_PATH="/MXCuBE/mxcube/extra_brick_test_1:/MXCuBE/mxcube/extra_brick_test_2"
HARDWARE_REPOSITORY_SERVER="${HO_SERVER}/gphl_mock:/${HO_SERVER}:/${HO_SERVER}/embl_hh_p14"
CUSTOM_HARDWARE_OBJECTS_PATH=""
HARDWARE_REPOSITORY_SERVER="${HO_CONFIGURATION}/gphl_mock:${HO_CONFIGURATION}/xml-qt:${HO_CONFIGURATION}/embl_hh_p14"
# HARDWARE_REPOSITORY_SERVER="${HO_CONFIGURATION}/gphl_mock:${HO_CONFIGURATION}:${HO_CONFIGURATION}/alba_xaloc13"
CUSTOM_HARDWARE_OBJECTS_PATH="/MXCuBE/mxcube/HardwareRepository/HardwareObjects/mockup"

CUSTOM_BRICKS_PATH=""

# User and mac address
Expand All @@ -21,8 +24,9 @@ CUSTOM_BRICKS_PATH=""
MAC_ADDRESS="54:ee:75:b6:8e:d3"
#
# User for docker - for giving correct file ownership.
# DOCKER_USER_ID="1000:100"
DOCKER_USER_ID="1158:3001"
DOCKER_USER_ID="1000:100"
# DOCKER_USER_ID="1158:3001"
# CONSIDER SOMETHING LKE --user $(id -u):$(id -g)
# User name - used only for file names etc.
USER_NAME="test_user"

Expand All @@ -38,18 +42,20 @@ OUTPUT_HOME="/home/rhfogh/dockerhome/"
# GPHL-specific directories for mounting
# Note: These are the same from insisde and outside the docker
# and so must be either identical or used on only one side.
GPHL_RELEASE_ROOT="/public/xtal/"
GPHL_SETUP_ROOT="/archive/rhfogh/mxcube/"
GPHL_RELEASE_ROOT="/mnt/scratch/rhfogh/GPhL/"
GPHL_SETUP_ROOT="/mnt/scratch/rhfogh/GPhL/mxcube_setup/"

# Location for output data - must be the same inside and outside docker
DATA_ROOT="/scratch_fs1/"
DATA_ROOT="/mnt/scratch/rhfogh/mxcube_data"


# End of settable parameters.


xhost +local:
# Command needed to run GPhL workflows
# Add in this for debug
# -p 8050:8050 \
exec docker run -it \
--mac-address $MAC_ADDRESS \
-p 25333:25333 \
Expand Down
25 changes: 25 additions & 0 deletions dev/gphl/Ubuntu_focal_qt5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu_focal_qt5

RUN apt-get update

RUN mkdir -p /MXCuBE
WORKDIR /MXCuBE

# Add user and group so files on main machine get to belong to user instead of root
# NB this must be adjusted to the test user. TODO move to separate docker
# RUN groupadd -g 3001 gphl
#RUN useradd -g gphl -m -s /bin/tcsh -u 1158 rhfogh
# No longer makes home directory - this must be mounted externally at startup
# RUN useradd -g gphl -s /bin/tcsh -u 1158 rhfogh

# Directories:
#
# GPhL code locations. Name is should match external directory structure,
# so that the same directory names work inside and outside the docker.
# RUN mkdir -p /archive
# RUN mkdir -p /scratch_fs1
# RUN mkdir -p /public/xtal
RUN mkdir -p /mnt/scratch

# Used instead of Entrypoint to allow alternative commands to be run
CMD ["python3", "/MXCuBE/mxcube/mxcubeqt/__main__.py", "--pyqt5", "--mockupMode"]
75 changes: 75 additions & 0 deletions dev/gphl/Ubuntu_focal_qt5/start_mxcube
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash

CONTAINER=mxcube_ubuntu_focal_qt5

# The following variables should be checked and (re)set as needed
#
MXCUBE_BASE="/MXCuBE"
MXCUBE_CORE="${MXCUBE_BASE}/mxcubecore/mxcubecore"
CUSTOM_BRICKS_PATH=""
CUSTOM_HARDWARE_OBJECTS_PATH="${MXCUBE_CORE}/HardwareObjects/mockup"

MOCKUP_XML_PATH="${MXCUBE_CORE}/configuration/mockup"
MXCUBE_CORE_CONFIG_PATH="${MOCKUP_XML_PATH}/gphl:${MOCKUP_XML_PATH}/qt:${MOCKUP_XML_PATH}"

# SOLEIL:
MXCUBE_CORE_CONFIG_PATH="${MXCUBE_CORE_CONFIG_PATH}:${MXCUBE_CORE}/configuration/soleil/px2/mockups"

# User and mac address
#
# Mac address for docker - nededed for GPhL license
MAC_ADDRESS="54:ee:75:b6:8e:d3"
#
# User for docker - for giving correct file ownership.
DOCKER_USER_ID="1000:100"
# DOCKER_USER_ID="1158:3001"
# CONSIDER SOMETHING LKE --user $(id -u):$(id -g)
# User name - used only for file names etc.
USER_NAME="test_user"

# Directories set-up
#
# MXCuBE installation is in /MXCuBE/mxcube, as per standard
#
# Home directory, used for e.g. .config and .ssh. Externally mounted.
DOCKER_HOME="/home/rhfogh/"
OUTPUT_HOME="/home/rhfogh/dockerhome/"
# GPhL software.

# GPHL-specific directories for mounting
# Note: These are the same from insisde and outside the docker
# and so must be either identical or used on only one side.
GPHL_RELEASE_ROOT="/mnt/scratch/rhfogh/GPhL/"
GPHL_SETUP_ROOT="/mnt/scratch/rhfogh/GPhL/mxcube_setup/"

# Location for output data - must be the same inside and outside docker
DATA_ROOT="/mnt/scratch/rhfogh/mxcube_data"

# End of settable parameters.


xhost +local:
# Command needed to run GPhL workflows
# Add in this for debug
# -p 8050:8050 \
exec docker run -it \
--mac-address $MAC_ADDRESS \
-p 25333:25333 \
-p 25334:25334 \
-h=$CONTAINER \
-u $DOCKER_USER_ID \
-e HOME=$DOCKER_HOME \
-e USER=$USER_NAME \
-e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-e MXCUBE_CORE_CONFIG_PATH=$MXCUBE_CORE_CONFIG_PATH \
-e CUSTOM_HARDWARE_OBJECTS_PATH=$CUSTOM_HARDWARE_OBJECTS_PATH \
-e CUSTOM_BRICKS_PATH=$CUSTOM_BRICKS_PATH \
-e PYTHONPATH=$MXCUBE_BASE/mxcube:$MXCUBE_BASE/mxcubecore \
-v $MXCUBE_ROOT:/MXCuBE \
-v $GPHL_RELEASE_ROOT:$GPHL_RELEASE_ROOT \
-v $GPHL_SETUP_ROOT:$GPHL_SETUP_ROOT \
-v $DATA_ROOT:$DATA_ROOT \
-v $OUTPUT_HOME:$DOCKER_HOME \
-v /tmp/.X11-unix:/tmp/.X11-unix \
$CONTAINER