Skip to content

Commit 4bcb9f0

Browse files
committed
build image
1 parent 5caf194 commit 4bcb9f0

File tree

3 files changed

+23
-47
lines changed

3 files changed

+23
-47
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
FROM python:3.7
22

33
EXPOSE 8501
4-
COPY requirements.txt .
5-
COPY app.py .
6-
7-
4+
COPY . .
85
RUN apt-get update
96
RUN apt-get install ffmpeg libsm6 libxext6 -y
107
RUN apt-get update && apt-get install -y libglib2.0-0 libsm6 libxrender1 libxext6 -y
11-
RUN pip install -r requirements_streamlit.txt
8+
RUN pip install -r requirements.txt
129
RUN pip install --upgrade requests
1310

14-
15-
CMD streamlit run app.py
11+
CMD bash setup.sh
12+
CMD streamlit run deployment/streamlit/app.py

deployment/streamlit/requirements.txt requirements.txt

+10-40
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ click==8.0.4
1717
colorama==0.4.5
1818
commonmark==0.9.1
1919
contextlib2==21.6.0
20-
contextvars==2.4
21-
cycler==0.11.0
22-
Cython==0.29.32
23-
dataclasses==0.8
24-
decorator==4.4.2
25-
defusedxml==0.7.1
20+
# contextvars==2.4
21+
# cycler==0.11.0
22+
# Cython
23+
# dataclasses==0.8
24+
# decorator==4.4.2
25+
# defusedxml==0.7.1
2626
einops==0.4.1
2727
entrypoints==0.4
2828
fastapi==0.82.0
@@ -73,7 +73,7 @@ prometheus-client==0.14.1
7373
prompt-toolkit==3.0.31
7474
protobuf==3.19.4
7575
pyarrow==6.0.1
76-
pycocotools-windows==2.0.0.2
76+
pycocotools
7777
pycparser==2.21
7878
pydantic==1.9.2
7979
pydeck==0.6.2
@@ -86,46 +86,16 @@ python-dateutil==2.8.2
8686
pytz==2022.2.1
8787
pytz-deprecation-shim==0.1.0.post0
8888
PyWavelets==1.1.1
89-
pywin32==304
90-
pywinpty==1.1.6
89+
# pywin32==304
90+
# pywinpty==1.1.6
9191
PyYAML==6.0
92-
pyzmq==23.2.1
93-
rdflib==5.0.0
9492
requests==2.27.1
95-
rich==12.5.1
9693
scikit-image==0.17.2
9794
scikit-learn==0.24.2
9895
scipy==1.5.4
99-
semver==2.13.0
100-
Send2Trash==1.8.0
101-
Shapely==1.8.4
102-
six==1.16.0
103-
smmap==5.0.0
104-
sniffio==1.2.0
105-
soupsieve==2.3.2.post1
106-
starlette==0.19.1
10796
streamlit==1.10.0
108-
terminado==0.12.1
109-
testpath==0.6.0
110-
threadpoolctl==3.1.0
111-
tifffile==2020.9.3
112-
toml==0.10.2
113-
toolz==0.12.0
11497
torch==1.10.2
11598
torch-geometric==2.0.3
11699
torchvision==0.11.3
117-
tornado==6.1
118100
tqdm==4.64.0
119-
traitlets==4.3.3
120-
typing_extensions==4.1.1
121-
tzdata==2022.2
122-
tzlocal==4.2
123-
urllib3==1.26.12
124-
validators==0.20.0
125-
watchdog==2.1.9
126-
wcwidth==0.2.5
127-
webencodings==0.5.1
128-
widgetsnbextension==3.6.1
129-
wincertstore==0.2
130-
yacs==0.1.8
131-
zipp==3.6.0
101+

setup.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo "Setting up..."
2+
pip install gdown
3+
echo "Downloading checkpoints..."
4+
gdown --fuzzy https://drive.google.com/file/d/1JWfHLMRwXVaZZCI0NpiL-VVooOYpv3TB/view?usp=sharing -O background_subtraction/maskrcnn/ckpts/model.pth
5+
gdown --fuzzy https://drive.google.com/file/d/1pcwcYKeKl5l316m6xsoIgcNsw6mrGzre/view?usp=sharing -O text_detection/craft/ckpts/craft_mlt_25k.pth
6+
gdown --fuzzy https://drive.google.com/file/d/1YoyKrJDEsGpMrCkgo9n44KfoD3VeRgJK/view?usp=sharing -O text_recognition/vietocr/ckpts/transformerocr.pth
7+
# gdown --fuzzy https://drive.google.com/file/d/1JWfHLMRwXVaZZCI0NpiL-VVooOYpv3TB/view?usp=sharing -O background_subtraction/maskrcnn/ckpts/model.pth
8+
echo "Loaded checkpoints"
9+
echo "Running app..."

0 commit comments

Comments
 (0)