forked from Nic30/hdlConvertor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (37 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
44 lines (37 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# note that this Dockerfile is meant for notebooks and you can install this package directly
# https://github.com/binder-examples/minimal-dockerfile
# When compiling specify build args to have ownership and permissions compatible with host
# docker build -t hdlConvertor --build-arg "NB_USER=$USER" --build-arg "NB_UID=$UID" .
# docker run --rm -it hdlConvertor /bin/bash
# python3 -m tests.all
FROM ubuntu:23.10
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
RUN apt update && apt upgrade -yq
RUN apt-get install adduser
# create or rename default user
RUN if id -un -- ${NB_UID} >/dev/null 2>&1 ; then\
echo "Delete user with colliding UID ${NB_UID}";\
deluser $(id -un -- ${NB_UID}) ;\
fi
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
RUN apt install build-essential uuid-dev cmake default-jre\
python3 python3-dev python3-pip libssl-dev -yq
RUN pip3 install scikit-build Cython notebook --break-system-packages
# RUN pip3 install hdlConvertor
# [mybinder specific]
# Make sure the contents of our repo are in ${HOME}
USER ${NB_USER}
COPY . ${HOME}
#USER root
WORKDIR ${HOME}
RUN pip3 install . --break-system-packages
RUN mv hdlConvertor _hdlConvertor # rename so folder does not interfere with the installation
#RUN chown -R ${NB_UID} ${HOME}
#USER ${NB_USER}