DeepDiveDev commited on
Commit
be076ca
1 Parent(s): 5e58f50

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -1,3 +1,4 @@
 
1
  FROM docker.io/library/python:3.10@sha256:aaacc373f21abcbc67a22d203dab7fb797c016cc4c1daa7d2dec359dcbf4aea1
2
 
3
  # Install necessary packages
@@ -6,6 +7,7 @@ RUN apt-get update && apt-get install -y \
6
  && rm -rf /var/lib/apt/lists/* \
7
  && git lfs install
8
 
 
9
  RUN apt-get update && apt-get install -y fakeroot \
10
  && mv /usr/bin/apt-get /usr/bin/.apt-get \
11
  && echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get \
@@ -13,11 +15,14 @@ RUN apt-get update && apt-get install -y fakeroot \
13
  && rm -rf /var/lib/apt/lists/* \
14
  && useradd -m -u 1000 user
15
 
 
16
  WORKDIR /home/user/app
17
 
18
  # Upgrade pip to the latest version
19
  RUN pip install --no-cache-dir --upgrade pip
20
 
21
- # Install packages from requirements.txt
22
  COPY requirements.txt /tmp/requirements.txt
 
 
23
  RUN pip install --no-cache-dir -r /tmp/requirements.txt
 
1
+
2
  FROM docker.io/library/python:3.10@sha256:aaacc373f21abcbc67a22d203dab7fb797c016cc4c1daa7d2dec359dcbf4aea1
3
 
4
  # Install necessary packages
 
7
  && rm -rf /var/lib/apt/lists/* \
8
  && git lfs install
9
 
10
+ # Create a non-root user
11
  RUN apt-get update && apt-get install -y fakeroot \
12
  && mv /usr/bin/apt-get /usr/bin/.apt-get \
13
  && echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get \
 
15
  && rm -rf /var/lib/apt/lists/* \
16
  && useradd -m -u 1000 user
17
 
18
+ # Set the working directory
19
  WORKDIR /home/user/app
20
 
21
  # Upgrade pip to the latest version
22
  RUN pip install --no-cache-dir --upgrade pip
23
 
24
+ # Copy requirements.txt to the container
25
  COPY requirements.txt /tmp/requirements.txt
26
+
27
+ # Install packages from requirements.txt
28
  RUN pip install --no-cache-dir -r /tmp/requirements.txt