Spaces:
Running
Running
abdullahmubeen10
commited on
Update Dockerfile
Browse files- 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 |
-
#
|
|
|
|
|
|
|
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 |
-
#
|
42 |
-
RUN
|
43 |
-
|
44 |
-
|
45 |
-
|
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 \
|