Skip to content

Commit

Permalink
Tidying up dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Nov 17, 2023
1 parent b44b582 commit ad624d5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 55 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-image-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Info on generated files
run: |
ls -alt
ls -alt output
ls -alt output/*
ls -alth
ls -alth output
ls -alth output/*
more output/*/report.json
6 changes: 3 additions & 3 deletions .github/workflows/docker-image-quickrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
./run-quick.sh
- name: Info on generated files
run: |
ls -alt
ls -alt output
ls -alt output/*
ls -alth
ls -alth output
ls -alth output/*
6 changes: 3 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
./run.sh
- name: Info on generated files
run: |
ls -alt
ls -alt output
ls -alt output/*
ls -alth
ls -alth output
ls -alth output/*
6 changes: 3 additions & 3 deletions .github/workflows/docker-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Info on generated files
run: |
ls -alt
ls -alt output
ls -alt output/*
ls -alth
ls -alth output
ls -alth output/*
more output/*
40 changes: 3 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ FROM ubuntu:22.04

LABEL maintainer="David Lung ([email protected]); Padraig Gleeson ([email protected])"

ARG INTEL_SDK_VERSION=2017_7.0.0.2511_x64

#COPY ./silent-intel-sdk.cfg /tmp/silent-intel-sdk.cfg


ARG USR=ow
ENV USER=$USR

Expand All @@ -23,12 +18,8 @@ RUN mkdir -p /etc/sudoers.d && \
chmod 0440 /etc/sudoers.d/$USER && \
chown ${uid}:${gid} -R /home/$USER


ENV DEBIAN_FRONTEND noninteractive # TODO: change

#RUN useradd -ms /bin/bash $USER


################################################################################
######## Update/install essential libraries

Expand All @@ -46,7 +37,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
libxft-dev python3-matplotlib unzip ffmpeg xvfb tmux

#RUN sudo pip install --upgrade pip
#RUN sudo apt-get install nvidia-opencl-dev

RUN sudo usermod -a -G video $USER

Expand Down Expand Up @@ -82,11 +72,7 @@ RUN owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/
################################################################################
######## Install Sibernetic for the worm body model

# RUN git clone https://github.com/openworm/sibernetic.git && \
# cd sibernetic && \
# git checkout ow-0.9.3 # fixed to a specific branch

RUN git clone https://github.com/pgleeson/sibernetic.git && \
RUN git clone https://github.com/openworm/sibernetic.git && \
cd sibernetic && \
git checkout ow-0.9.4 # fixed to a specific branch

Expand All @@ -100,27 +86,8 @@ ENV PYTHONPATH=$PYTHONPATH:$HOME/c302:$SIBERNETIC_HOME


################################################################################
######## Install Intel OpenCL libraries needed for Sibernetic

# Legacy install of Intel's OpenCL Drivers:
# RUN mkdir intel-opencl-tmp && \
# cd intel-opencl-tmp && \
# mkdir intel-opencl && \
# wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip && \
# unzip SRB5.0_linux64.zip && \
# tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz && \
# tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz && \
# tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz && \
# sudo cp -R intel-opencl/* / && \
# sudo ldconfig && \
# cd .. && \
# sudo rm -r intel-opencl-tmp

# RUN sudo cp -R /opt/intel/opencl/include/CL /usr/include/ && \
# sudo apt install -y ocl-icd-opencl-dev vim
# #sudo ln -s /opt/intel/opencl/libOpenCL.so.1 /usr/lib/libOpenCL.so

# Install AMD's OpenCL Drivers (AMD-APP-SDK 3.0):
######## Install AMD's OpenCL Drivers (AMD-APP-SDK 3.0)

RUN wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
RUN tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
RUN printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
Expand All @@ -140,7 +107,6 @@ RUN clinfo
######## Build Sibernetic

RUN cd sibernetic && \
sed -i -e "s/n2.7/n3.10/g" makefile && \
make clean && make all && ldd ./Release/Sibernetic # Use python 3 libs


Expand Down
7 changes: 1 addition & 6 deletions Dockerfile_intel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ RUN mkdir -p /etc/sudoers.d && \
chmod 0440 /etc/sudoers.d/$USER && \
chown ${uid}:${gid} -R /home/$USER


ENV DEBIAN_FRONTEND noninteractive # TODO: change


Expand Down Expand Up @@ -91,7 +90,6 @@ ENV PYTHONPATH=$PYTHONPATH:$HOME/c302:$SIBERNETIC_HOME
######## Install Intel OpenCL libraries needed for Sibernetic

# Legacy install of Intel's OpenCL Drivers:
# ARG INTEL_SDK_VERSION=2017_7.0.0.2511_x64

RUN mkdir intel-opencl-tmp && \
cd intel-opencl-tmp && \
Expand All @@ -107,9 +105,7 @@ RUN mkdir intel-opencl-tmp && \
sudo rm -r intel-opencl-tmp

RUN sudo cp -R /opt/intel/opencl/include/CL /usr/include/ && \
sudo apt install -y ocl-icd-opencl-dev vim
#sudo ln -s /opt/intel/opencl/libOpenCL.so.1 /usr/lib/libOpenCL.so

sudo apt install -y ocl-icd-opencl-dev vim

RUN echo "OpenCL Driver Installation Complete"

Expand All @@ -118,7 +114,6 @@ RUN echo "OpenCL Driver Installation Complete"
######## Build Sibernetic

RUN cd sibernetic && \
sed -i -e "s/n2.7/n3.10/g" makefile && \
make clean && make all && ldd ./Release/Sibernetic # Use python 3 libs


Expand Down

0 comments on commit ad624d5

Please sign in to comment.