abdullahmubeen10 commited on
Commit
987d8f3
·
verified ·
1 Parent(s): 4cc3248

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -10,7 +10,10 @@ ENV NB_UID 1000
10
  ENV HOME /home/${NB_USER}
11
  ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64/
12
 
13
- # Install required packages
 
 
 
14
  RUN apt-get update && apt-get install -y \
15
  tzdata \
16
  tar \
@@ -38,11 +41,11 @@ RUN apt-get update && apt-get install -y \
38
  # Set timezone to a specific value (e.g., UTC)
39
  RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata
40
 
41
- # Install Python 3.11 and pip (latest stable Python as of 2024)
42
- RUN add-apt-repository ppa:deadsnakes/ppa \
43
- && apt-get update \
44
- && apt-get install -y python3.11 python3.11-dev python3-pip \
45
- && apt-get clean
46
 
47
  # Set up JAVA_HOME
48
  RUN echo "export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" >> /etc/profile \
 
10
  ENV HOME /home/${NB_USER}
11
  ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64/
12
 
13
+ # Set environment variable to disable interactive prompts
14
+ ENV DEBIAN_FRONTEND=noninteractive
15
+
16
+ # Install required packages and set up timezone
17
  RUN apt-get update && apt-get install -y \
18
  tzdata \
19
  tar \
 
41
  # Set timezone to a specific value (e.g., UTC)
42
  RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata
43
 
44
+ # Fix permissions on the .local directory to ensure pip can write
45
+ RUN mkdir -p /home/${NB_USER}/.local && chown -R ${NB_USER}:${NB_USER} /home/${NB_USER}/.local
46
+
47
+ # Install Python 3.11 and upgrade pip
48
+ RUN python3.11 -m pip install --upgrade pip
49
 
50
  # Set up JAVA_HOME
51
  RUN echo "export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" >> /etc/profile \