Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +10 -17
Dockerfile
CHANGED
|
@@ -1,13 +1,4 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM python:3.8.9
|
| 3 |
-
|
| 4 |
-
# Set the working directory to /app
|
| 5 |
-
WORKDIR /app
|
| 6 |
-
|
| 7 |
-
# Copy the package list and requirements file to the container
|
| 8 |
-
COPY packages.txt requirements.txt /root/
|
| 9 |
-
|
| 10 |
-
# Update the package repository sources list
|
| 11 |
RUN sed -i 's http://deb.debian.org http://cdn-aws.deb.debian.org g' /etc/apt/sources.list && \
|
| 12 |
sed -i 's http://archive.ubuntu.com http://us-east-1.ec2.archive.ubuntu.com g' /etc/apt/sources.list && \
|
| 13 |
sed -i '/security/d' /etc/apt/sources.list && \
|
|
@@ -15,15 +6,17 @@ RUN sed -i 's http://deb.debian.org http://cdn-aws.deb.debian.org g' /etc/apt/so
|
|
| 15 |
xargs -r -a /root/packages.txt apt-get install -y && \
|
| 16 |
rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
# Install Python packages not listed in requirements.txt
|
| 22 |
-
RUN pip install --no-cache-dir datasets==1.14.0 huggingface-hub==0.12.1 python3-protobuf python3-click
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
|
|
|
|
|
|
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
|
|
|
|
| 1 |
+
# Update the package sources and install required packages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
RUN sed -i 's http://deb.debian.org http://cdn-aws.deb.debian.org g' /etc/apt/sources.list && \
|
| 3 |
sed -i 's http://archive.ubuntu.com http://us-east-1.ec2.archive.ubuntu.com g' /etc/apt/sources.list && \
|
| 4 |
sed -i '/security/d' /etc/apt/sources.list && \
|
|
|
|
| 6 |
xargs -r -a /root/packages.txt apt-get install -y && \
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# Copy the package list and requirements file to the container
|
| 10 |
+
COPY packages.txt requirements.txt /root/
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
# Install Python and the packages listed in requirements.txt
|
| 13 |
+
RUN apt-get update && \
|
| 14 |
+
DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip && \
|
| 15 |
+
pip3 install --no-cache-dir datasets==1.14.0 huggingface-hub==0.12.1
|
| 16 |
|
| 17 |
+
# Install additional Python packages listed in packages.txt
|
| 18 |
+
RUN xargs -r -a /root/packages.txt apt-get install -y && \
|
| 19 |
+
rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
|
| 22 |
|