tyang4 commited on
Commit
befc054
·
verified ·
1 Parent(s): 80ab0bd

Add dev-mode compatibility

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -14,10 +14,12 @@ RUN apt-get update && apt-get install -y \
14
  vim && \
15
  rm -rf /var/lib/apt/lists/*
16
 
 
 
 
 
17
  WORKDIR /app
18
- COPY --link ./ /app
19
- RUN chown 1000 /app
20
- USER 1000
21
 
22
  RUN pip install --no-cache-dir streamlit pandas transformers torch faiss-cpu scikit-learn neo4j pydeck requests
23
 
@@ -26,7 +28,9 @@ COPY model/ ./model/
26
  COPY requirements.txt ./
27
  COPY src/ ./src/
28
 
29
- RUN pip3 install -r requirements.txt
 
 
30
 
31
  EXPOSE 8501
32
 
 
14
  vim && \
15
  rm -rf /var/lib/apt/lists/*
16
 
17
+ RUN useradd -m -u 1000 user
18
+ USER user
19
+ ENV PATH="/home/user/.local/bin:$PATH"
20
+
21
  WORKDIR /app
22
+ COPY --chown=user ./requirements.txt requirements.txt
 
 
23
 
24
  RUN pip install --no-cache-dir streamlit pandas transformers torch faiss-cpu scikit-learn neo4j pydeck requests
25
 
 
28
  COPY requirements.txt ./
29
  COPY src/ ./src/
30
 
31
+ RUN pip install -r requirements.txt
32
+
33
+ COPY --chown=user . /app
34
 
35
  EXPOSE 8501
36