Skip to content

Commit

Permalink
Merge pull request #3 from qxcv/update-dockerfile
Browse files Browse the repository at this point in the history
Dockerfile from Felipe's students
  • Loading branch information
qxcv authored Mar 28, 2023
2 parents d162053 + ca7d544 commit 04fcd23
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 74 deletions.
59 changes: 45 additions & 14 deletions asnets/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
FROM ubuntu:19.10
RUN apt-get update -y && apt-get install -y python3-numpy python3-dev \
python3-pip python3-wheel python3-venv flex bison build-essential \
autoconf libtool git cmake libboost-all-dev
RUN useradd -ms /bin/bash asnets
COPY . /home/asnets/asnets
RUN chown -R asnets:asnets /home/asnets/asnets
USER asnets
WORKDIR /home/asnets/asnets
RUN python3 -m venv ${HOME}/venv-asnets
RUN . ${HOME}/venv-asnets/bin/activate \
&& echo . ${HOME}/venv-asnets/bin/activate >> ${HOME}/.bashrc \
&& pip install --upgrade pip \
&& pip install -e ${HOME}/asnets/
# Dockerfile for asnets
#
# To build:
# docker build -t asnets-bionic -f asnets-bionic.dockerfile .
#
# To run:
# docker run -i --rm --mount type=bind,source=<full_path_to_shared_dir>,target=/home/asnets_user/shared -t asnets-bionic /bin/bash

# Base container.
FROM ubuntu:bionic

# Install packages.
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-numpy python3-dev python3-pip python3-wheel python3-venv flex \
bison build-essential autoconf libtool git libboost-all-dev cmake \
libhdf5-dev g++ git make

# Set up asnets user and group.
RUN groupadd -g 999 asnets_user \
&& useradd -r -u 999 -g asnets_user asnets_user \
&& mkdir /home/asnets_user \
&& chown -R asnets_user:asnets_user /home/asnets_user \
&& adduser asnets_user sudo \
&& echo "asnets ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER asnets_user

# Make sure LD_LIBRARY_PATH is set correctly to include /usr/local/lib.
ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib/aarch64-linux-gnu:${LD_LIBRARY_PATH}

WORKDIR /home/asnets_user

# Install ASNets
RUN git clone https://github.com/qxcv/asnets.git

RUN python3 -m venv venv-asnets && . venv-asnets/bin/activate \
&& pip3 install --upgrade pip \
&& pip3 install wheel cython numpy pkgconfig protobuf==3.19.6 werkzeug

RUN . venv-asnets/bin/activate && pip3 install -e asnets/asnets

RUN echo 'source ~/venv-asnets/bin/activate' >> ~/.bashrc

RUN echo 'ulimit -S -v 64000000' >> ~/.bashrc
60 changes: 0 additions & 60 deletions asnets/singularity.def

This file was deleted.

0 comments on commit 04fcd23

Please sign in to comment.