RamV commited on
Commit
95ce0ec
·
1 Parent(s): db1c61d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -16
Dockerfile CHANGED
@@ -1,27 +1,16 @@
1
- RUN pip install --no-cache-dir pip==22.3.1
2
- RUN pip install --no-cache-dir datasets "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1"
3
-
4
-
5
  # Copy the package list and requirements file to the container
6
  COPY packages.txt requirements.txt /root/
7
 
8
  # Update the package list and install the packages listed in packages.txt
9
- RUN sed -i 's/archive.ubuntu.com/us.archive.ubuntu.com/' /etc/apt/sources.list && \
 
 
10
  apt-get update && \
11
- DEBIAN_FRONTEND=noninteractive apt-get install -y $(cat /root/packages.txt) && \
12
  rm -rf /var/lib/apt/lists/*
13
 
14
  # Install Python and the packages listed in requirements.txt
15
  RUN apt-get update && \
16
  DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip && \
17
- pip3 install -r /root/requirements.txt
18
-
19
- # Set the working directory to /app
20
- WORKDIR /app
21
-
22
- # Copy the code to the container
23
- COPY app.py /app/app.py
24
-
25
- # Start the application
26
- CMD ["python3", "app.py"]
27
 
 
 
 
 
 
1
  # Copy the package list and requirements file to the container
2
  COPY packages.txt requirements.txt /root/
3
 
4
  # Update the package list and install the packages listed in packages.txt
5
+ RUN sed -i 's/http:\/\/deb.debian.org/http:\/\/cdn-aws.deb.debian.org/g' /etc/apt/sources.list && \
6
+ sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/us-east-1.ec2.archive.ubuntu.com/g' /etc/apt/sources.list && \
7
+ sed -i '/security/d' /etc/apt/sources.list && \
8
  apt-get update && \
9
+ xargs -r -a /root/packages.txt apt-get install -y && \
10
  rm -rf /var/lib/apt/lists/*
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 -r /root/requirements.txt
 
 
 
 
 
 
 
 
 
16