chanycha commited on
Commit
7307fbf
1 Parent(s): 229955d
Files changed (2) hide show
  1. Dockerfile +22 -0
  2. requirements.txt +1 -1
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM docker.io/library/python:3.10@sha256:d12ca2c8482a44ccd00661f0bbc502abf2e96c3bf46e3bdc8f8aeba2d29267f6
2
+
3
+ RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install
4
+
5
+ RUN apt-get update && apt-get install -y fakeroot && mv /usr/bin/apt-get /usr/bin/.apt-get && echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get && chmod +x /usr/bin/apt-get && rm -rf /var/lib/apt/lists/* && useradd -m -u 1000 user
6
+
7
+ # COPY --chown=1000:1000 --from=root
8
+
9
+ WORKDIR /home/user/app
10
+
11
+ RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
12
+
13
+ RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
14
+
15
+ RUN pip install --no-cache-dir gradio[oauth]==4.38.1 "uvicorn>=0.14.0" spaces
16
+
17
+ # COPY --link --chown=1000 ./ /home/user/app
18
+ COPY ./ /home/user/app
19
+
20
+ RUN pip freeze > /tmp/freeze.txt
21
+
22
+ # COPY /tmp/freeze.txt /tmp/freeze.txt
requirements.txt CHANGED
@@ -19,7 +19,7 @@ xgboost
19
  flask
20
  flask-cors
21
  flask-restx
22
- git+https://github.com/OpenXAIProject/pnpxai.git@dev#egg=pnpxai
23
  optuna
24
 
25
  # for text explainers
 
19
  flask
20
  flask-cors
21
  flask-restx
22
+ git+https://github.com/OpenXAIProject/pnpxai.git@demo-hf#egg=pnpxai
23
  optuna
24
 
25
  # for text explainers