-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
45 lines (31 loc) · 1.01 KB
/
dockerfile
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
45
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
LABEL maintainer="Nehcy <[email protected]>"
ARG NB_USER="wald"
ARG NB_UID="1000"
ARG NB_GID="100"
ARG NB_DIR="work"
RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt-get install --yes --no-install-recommends \
python-is-python3 \
python3-dev \
build-essential \
python3-pip \
ffmpeg libsm6 libxext6 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Create NB_USER with name NB_USER user with UID=1000 and in the 'users' group
#chmod g+w /etc/passwd && \
RUN useradd -l -m -s /bin/bash -N -u "${NB_UID}" "${NB_USER}" # && \
chown "${NB_USER}:${NB_GID}" "/home/${NB_USER}/"
USER "${NB_UID}"
WORKDIR "/home/${NB_USER}/"
ENV PATH="$PATH:/home/${NB_USER}/.local/bin"
COPY requirements.txt ./
RUN python -m pip install --upgrade pip wheel && \
pip install -r requirements.txt && \
python -m pip cache purge
WORKDIR "./${NB_DIR}"
COPY ./src/ ./
# Configure container startup
ENTRYPOINT ["gradio", "app.py"]