trannam1084 commited on
Commit
5650911
·
verified ·
1 Parent(s): f4c5c6b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -5
Dockerfile CHANGED
@@ -1,17 +1,26 @@
1
- FROM python:3.13.5-slim
2
 
3
- WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
 
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- COPY requirements.txt ./
12
- COPY src/ ./src/
13
 
14
- RUN pip3 install -r requirements.txt
 
 
 
 
 
 
 
 
15
 
16
  EXPOSE 8501
17
 
 
1
+ FROM python:3.10-slim
2
 
3
+ WORKDIR /code
4
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
+ software-properties-common \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ COPY . .
16
+
17
+ RUN useradd -m -u 1000 user
18
+ USER user
19
+ ENV HOME=/home/user \
20
+ PATH=/home/user/.local/bin:$PATH
21
+
22
+ WORKDIR $HOME/app
23
+ COPY --chown=user . $HOME/app
24
 
25
  EXPOSE 8501
26