ManasSharma07 commited on
Commit
c9161c0
·
verified ·
1 Parent(s): 0412b78

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
  FROM python:3.10-slim
2
 
3
- WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
@@ -15,10 +14,14 @@ COPY src/ ./src/
15
  RUN pip3 install -r requirements.txt
16
 
17
  EXPOSE 8501
18
- ENV HF_HOME=/home/user/huggingface
19
- ENV CACHE_DIR=/home/user/huggingface
20
- ENV HOME=/app
21
- ENV PATH=/home/user/.local/bin:$PATH
 
 
 
 
22
 
23
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
24
 
 
1
  FROM python:3.10-slim
2
 
 
3
 
4
  RUN apt-get update && apt-get install -y \
5
  build-essential \
 
14
  RUN pip3 install -r requirements.txt
15
 
16
  EXPOSE 8501
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
+
24
+ COPY --chown=user . $HOME/app
25
 
26
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
27