@@ -10,23 +10,33 @@ RUN apt-get update && apt-get install -y gcc \
1010# Workaround for build issue with so3g needing specifically the 'python' executable
1111RUN ln -s /usr/bin/python3.10 /usr/bin/python
1212
13+ # Create streamer user and group
14+ RUN groupadd -g 9003 streamer && \
15+ useradd -m -l -u 9003 -g 9003 streamer
16+
17+ # Setting up virtual environment
18+ RUN python3 -m venv /opt/venv/
19+ ENV PATH="/opt/venv/bin:$PATH"
20+ RUN python3 -m pip install -U pip
21+
1322# Guaranteeing that there will be a common build directory for socs/spt3g
1423WORKDIR /usr/local/so3g
1524WORKDIR /usr/local/src
1625
17- ENV SO3G_DIR /usr/local/src/so3g
18- ENV SPT3G_DIR /usr/local/src/spt3g_software
19- ENV SPT3G_SOFTWARE_PATH /usr/local/src/spt3g_software
20- ENV RFSOC_DIR /usr/local/src/rfsoc-streamer
21- ENV LD_LIBRARY_PATH /usr/local/so3g/lib:/usr/local/so3g/so3g
22- ENV STREAM_CONFIG_DIR /config
23- ENV SPT3G_SOFTWARE_BUILD_PATH ${SPT3G_DIR}/build
24- ENV SO3G_BUILD_PATH /usr/local/so3g/lib
26+ ENV SO3G_DIR= /usr/local/src/so3g
27+ ENV SPT3G_DIR= /usr/local/src/spt3g_software
28+ ENV SPT3G_SOFTWARE_PATH= /usr/local/src/spt3g_software
29+ ENV RFSOC_DIR= /usr/local/src/rfsoc-streamer
30+ ENV LD_LIBRARY_PATH= /usr/local/so3g/lib:/usr/local/so3g/so3g
31+ ENV STREAM_CONFIG_DIR= /config
32+ ENV SPT3G_SOFTWARE_BUILD_PATH= ${SPT3G_DIR}/build
33+ ENV SO3G_BUILD_PATH= /usr/local/so3g/lib
2534
2635# Clone all repos
2736RUN git clone https://github.com/CMB-S4/spt3g_software.git
2837RUN git clone https://github.com/simonsobs/so3g.git
29- RUN git clone https://github.com/ccatobs/rfsoc-streamer.git
38+ # RUN git clone https://github.com/ccatobs/rfsoc-streamer.git
39+ COPY . /usr/local/src/rfsoc-streamer
3040
3141# Install spt3g
3242WORKDIR /usr/local/src/spt3g_software/build
@@ -47,7 +57,7 @@ RUN make install
4757
4858# Install so3g
4959WORKDIR /usr/local/src/so3g
50- RUN pip3 install -r requirements.txt
60+ RUN pip install -r requirements.txt
5161WORKDIR /usr/local/src/so3g/build
5262
5363# Seems to have a bug with finding cmake here...hash -r fixes it
@@ -65,13 +75,14 @@ RUN make install
6575
6676# Install rfsoc-streamer
6777WORKDIR /usr/local/src/rfsoc-streamer
68- RUN CMAKE .
69- RUN MAKE
78+ RUN cmake .
79+ RUN make
7080
71- export PYTHONPATH="${RFSOC_DIR}/lib:${RFSOC_DIR}/python:$SPT3G_SOFTWARE_BUILD_PATH:$SO3G_BUILD_PATH:$PYTHONPATH"
72- export PATH="/usr/local/so3g/bin:${PATH}"
81+ # There is no PYTHONPATH to start, so no need to append it to the end here
82+ ENV PYTHONPATH="${RFSOC_DIR}/lib:${RFSOC_DIR}/python:$SPT3G_SOFTWARE_BUILD_PATH:$SO3G_BUILD_PATH"
83+ ENV PATH="/usr/local/so3g/bin:${PATH}"
7384
74- RUN pip3 install dumb-init
85+ RUN pip install dumb-init
7586
7687# The command to run stream.py will be in the docker-compose.yml file
7788# for more granular user control
0 commit comments