rocky250 commited on
Commit
cdd6c85
·
verified ·
1 Parent(s): 6e26fdd

Update Dockerfile

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