Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +21 -24
Dockerfile
CHANGED
@@ -1,32 +1,29 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
software-properties-common \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
wget \
|
7 |
curl \
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
graphviz \
|
19 |
-
openjdk-8-jdk \
|
20 |
-
python3.4 \
|
21 |
-
python3.4-dev \
|
22 |
-
python3-pip \
|
23 |
-
ant \
|
24 |
-
ca-certificates \
|
25 |
-
&& apt-get clean \
|
26 |
-
&& update-ca-certificates -f
|
27 |
-
|
28 |
-
# Install a pip version compatible with Python 3.4
|
29 |
-
RUN python3.4 -m pip install --upgrade "pip<21.0"
|
30 |
|
31 |
# Copy requirements file
|
32 |
COPY requirements.txt /tmp/requirements.txt
|
|
|
1 |
+
# Use an older Ubuntu version that supports Python 3.4
|
2 |
+
FROM ubuntu:14.04
|
3 |
|
4 |
+
# Update package lists and install required dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
software-properties-common \
|
7 |
+
build-essential \
|
8 |
+
libssl-dev \
|
9 |
+
zlib1g-dev \
|
10 |
+
libncurses5-dev \
|
11 |
+
libgdbm-dev \
|
12 |
+
libnss3-dev \
|
13 |
+
libreadline-dev \
|
14 |
+
libffi-dev \
|
15 |
wget \
|
16 |
curl \
|
17 |
+
&& rm -rf /var/lib/apt/lists/*
|
18 |
+
|
19 |
+
# Add deadsnakes PPA for Python 3.4
|
20 |
+
RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update
|
21 |
+
|
22 |
+
# Install Python 3.4
|
23 |
+
RUN apt-get install -y python3.4 python3.4-dev python3.4-venv
|
24 |
+
|
25 |
+
# Set Python 3.4 as default (optional)
|
26 |
+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.4 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
# Copy requirements file
|
29 |
COPY requirements.txt /tmp/requirements.txt
|