abdullahmubeen10 commited on
Commit
f048051
·
verified ·
1 Parent(s): 8e2153a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -14
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
- # Use an Ubuntu base image
2
- FROM ubuntu:16.04
3
 
4
  # Set environment variables
5
  ENV NB_USER=jovyan
@@ -7,7 +6,7 @@ ENV NB_UID=1000
7
  ENV HOME=/home/${NB_USER}
8
  ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
9
 
10
- # Install Python 3.4 and dependencies
11
  RUN apt-get update && apt-get install -y \
12
  software-properties-common \
13
  wget \
@@ -24,20 +23,20 @@ RUN apt-get update && apt-get install -y \
24
  pkg-config \
25
  graphviz \
26
  openjdk-8-jdk \
27
- python3.4 \
28
- python3.4-dev \
29
  python3-pip \
30
  ant \
31
  ca-certificates \
32
  && apt-get clean \
33
  && update-ca-certificates -f
34
 
35
- # Set up JAVA_HOME for OpenJDK 8
36
- RUN echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> /etc/profile \
37
- && echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/profile
38
 
39
- # Upgrade pip for Python 3.4 (using an older version of pip)
40
- RUN python3.4 -m pip install --upgrade pip==9.0.3 setuptools==44.1.1
 
41
 
42
  # Create a new user
43
  RUN useradd -m -u ${NB_UID} ${NB_USER}
@@ -49,10 +48,6 @@ USER ${NB_USER}
49
  ENV HOME=/home/${NB_USER}
50
  ENV PATH=/home/${NB_USER}/.local/bin:$PATH
51
 
52
- # Install Python dependencies from requirements.txt
53
- COPY requirements.txt /tmp/requirements.txt
54
- RUN python3.4 -m pip install --no-cache-dir -r /tmp/requirements.txt
55
-
56
  # Copy application code to the container
57
  COPY --chown=${NB_USER}:${NB_USER} . ${HOME}
58
 
 
1
+ FROM ubuntu:18.04
 
2
 
3
  # Set environment variables
4
  ENV NB_USER=jovyan
 
6
  ENV HOME=/home/${NB_USER}
7
  ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
8
 
9
+ # Install required system packages and Python 3.6
10
  RUN apt-get update && apt-get install -y \
11
  software-properties-common \
12
  wget \
 
23
  pkg-config \
24
  graphviz \
25
  openjdk-8-jdk \
26
+ python3.5 \
27
+ python3.5-dev \
28
  python3-pip \
29
  ant \
30
  ca-certificates \
31
  && apt-get clean \
32
  && update-ca-certificates -f
33
 
34
+ # Upgrade pip for Python 3.6
35
+ RUN python3.5 -m pip install --upgrade pip setuptools
 
36
 
37
+ # Install Python dependencies
38
+ COPY requirements.txt /tmp/requirements.txt
39
+ RUN python3.5 -m pip install --no-cache-dir -r /tmp/requirements.txt
40
 
41
  # Create a new user
42
  RUN useradd -m -u ${NB_UID} ${NB_USER}
 
48
  ENV HOME=/home/${NB_USER}
49
  ENV PATH=/home/${NB_USER}/.local/bin:$PATH
50
 
 
 
 
 
51
  # Copy application code to the container
52
  COPY --chown=${NB_USER}:${NB_USER} . ${HOME}
53