forked from profuzzbench/profuzzbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-eval
44 lines (35 loc) · 1.69 KB
/
Dockerfile-eval
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
FROM ubuntu:23.04
ARG HTTP_PROXY
ARG HTTPS_PROXY
ENV HTTP_PROXY=${HTTP_PROXY}
ENV HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy=${HTTP_PROXY}
ENV https_proxy=${HTTP_PROXY}
# Change the Ubuntu package mirror
RUN apt update && apt install -y apt-transport-https ca-certificates
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list && apt clean
ENV DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt update -y && \
apt install -y \
build-essential graphviz-dev sudo \
python3 python3-pip python3-dev python3-setuptools python-is-python3 \
&& rm -rf /var/lib/apt/lists
ARG USER_ID=1000
ARG GROUP_ID=1000
ENV USER_ID=${USER_ID}
ENV GROUP_ID=${GROUP_ID}
RUN userdel $(getent passwd ${USER_ID} | cut -d: -f1) || true
RUN groupdel $(getent group ${GROUP_ID} | cut -d: -f1) || true
RUN groupadd -g ${GROUP_ID} user && \
useradd -u ${USER_ID} -rm -d /home/user -s /usr/bin/zsh -g user -G sudo user -p "$(openssl passwd -1 user)" && \
echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER user
WORKDIR /home/user
RUN --mount=type=bind,source=scripts,target=/home/user/scripts \
--mount=type=cache,target=/home/user/.cache/pip \
sudo pip3 install --break-system-packages -i https://mirrors.aliyun.com/pypi/simple -r scripts/requirements.txt
RUN jupyter server --generate-config && \
echo "c.NotebookApp.token = ''" >> /home/user/.jupyter/jupyter_server_config.py && \
echo "c.NotebookApp.disable_check_xsrf = True" >> /home/user/.jupyter/jupyter_server_config.py
ENTRYPOINT ["bash", "-c", "jupyter lab --allow_remote_access=true --ip='*' --port=38888 --notebook-dir=/home/user/profuzzbench"]