XciD HF staff commited on
Commit
7c4081b
1 Parent(s): 30c8aac

Dockerize + pip freeze

Browse files
Dockerfile ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1.4
2
+ FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
3
+ # BEGIN Static part
4
+ ENV DEBIAN_FRONTEND=noninteractive \
5
+ TZ=Europe/Paris
6
+
7
+ RUN apt-get update && apt-get install -y \
8
+ git \
9
+ make build-essential libssl-dev zlib1g-dev \
10
+ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
11
+ libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \
12
+ ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
13
+ && rm -rf /var/lib/apt/lists/* \
14
+ && git lfs install
15
+
16
+ # User
17
+ RUN useradd -m -u 1000 user
18
+ USER user
19
+ ENV HOME=/home/user \
20
+ PATH=/home/user/.local/bin:$PATH
21
+ WORKDIR /home/user/app
22
+
23
+ # Pyenv
24
+ RUN curl https://pyenv.run | bash
25
+ ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
26
+
27
+ # Python
28
+ RUN pyenv install 3.7.5 && \
29
+ pyenv global 3.7.5 && \
30
+ pyenv rehash && \
31
+ pip install --no-cache-dir --upgrade pip setuptools wheel && \
32
+ pip install --no-cache-dir \
33
+ datasets \
34
+ huggingface-hub "protobuf<4" "click<8.1"
35
+
36
+ COPY --link --chown=1000 requirements.txt /home/user/app/requirements.txt
37
+ RUN pip install --no-cache-dir -r requirements.txt
38
+
39
+ COPY --link --chown=1000 ./ /home/user/app
40
+
41
+ CMD ["python", "-m", "detector.server", "detector-base.pt", "--port=7860"]
detector/__pycache__/server.cpython-37.pyc ADDED
Binary file (4.78 kB). View file
 
post_endpoint.patch ADDED
Binary file (4.02 kB). View file
 
requirements.txt CHANGED
@@ -1,6 +1,37 @@
1
- transformers>=2.0.0
2
- fire>=0.2.1
3
- requests>=2.22.0
4
- tqdm>=4.32.2
5
- torch>=1.2.0
6
- tensorboard>=1.14.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ absl-py==0.8.1
2
+ boto3==1.10.11
3
+ botocore==1.13.11
4
+ cachetools==3.1.1
5
+ certifi==2019.9.11
6
+ chardet==3.0.4
7
+ Click==7.0
8
+ docutils==0.15.2
9
+ fire==0.2.1
10
+ google-auth==1.7.0
11
+ google-auth-oauthlib==0.4.1
12
+ grpcio==1.25.0
13
+ idna==2.8
14
+ jmespath==0.9.4
15
+ joblib==0.14.0
16
+ Markdown==3.1.1
17
+ numpy==1.17.3
18
+ oauthlib==3.1.0
19
+ protobuf==3.10.0
20
+ pyasn1==0.4.7
21
+ pyasn1-modules==0.2.7
22
+ python-dateutil==2.8.0
23
+ regex==2019.11.1
24
+ requests==2.22.0
25
+ requests-oauthlib==1.3.0
26
+ rsa==4.0
27
+ s3transfer==0.2.1
28
+ sacremoses==0.0.35
29
+ sentencepiece==0.1.83
30
+ six==1.13.0
31
+ tensorboard==2.0.1
32
+ termcolor==1.1.0
33
+ torch==1.3.0
34
+ tqdm==4.37.0
35
+ transformers==2.1.1
36
+ urllib3==1.25.6
37
+ Werkzeug==0.16.0