Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-thumbor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Grewe
docker-thumbor
Commits
d1ad3493
Commit
d1ad3493
authored
1 year ago
by
Jan Grewe
Browse files
Options
Downloads
Patches
Plain Diff
update to 7.7.2
parent
e8551b07
Branches
master
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+3
-5
3 additions, 5 deletions
Dockerfile
remotecv/https_loader.py
+0
-8
0 additions, 8 deletions
remotecv/https_loader.py
remotecv/redis_store.py
+0
-29
0 additions, 29 deletions
remotecv/redis_store.py
with
3 additions
and
42 deletions
Dockerfile
+
3
−
5
View file @
d1ad3493
FROM
python:
2
FROM
python:
3
RUN
apt-get update
-qq
\
&& apt-get install -qqy --no-install-recommends libjpeg-turbo-progs \
&& rm -r /var/lib/apt/lists/*
RUN
pip
install
thumbor
==
6
.7.
5
remotecv
==
2.3.0
opencv-python pycurl redis tc_redis tc_prometheus
RUN
pip
install
thumbor
==
7
.7.
2
remotecv
==
5.1.6
opencv-python pycurl redis tc_redis tc_prometheus
RUN
mkdir
/etc/thumbor
\
&& thumbor-config > /etc/thumbor.conf
ADD
remotecv/redis_store.py /usr/local/lib/python2.7/site-packages/remotecv/result_store/redis_store.py
ADD
remotecv/https_loader.py /usr/local/lib/python2.7/site-packages/remotecv/https_loader.py
EXPOSE
8888
EXPOSE
8000
ENV
PYTHONUNBUFFERED=1
CMD
["/usr/local/bin/thumbor"]
This diff is collapsed.
Click to expand it.
remotecv/https_loader.py
deleted
100644 → 0
+
0
−
8
View file @
e8551b07
import
urllib2
import
re
def
load_sync
(
path
):
if
not
re
.
match
(
r
'
^http?
'
,
path
):
path
=
'
https://%s
'
%
path
path
=
urllib2
.
unquote
(
path
)
return
urllib2
.
urlopen
(
path
).
read
()
This diff is collapsed.
Click to expand it.
remotecv/redis_store.py
deleted
100644 → 0
+
0
−
29
View file @
e8551b07
from
redis
import
Redis
from
remotecv.utils
import
logger
from
remotecv.result_store
import
BaseStore
class
ResultStore
(
BaseStore
):
WEEK
=
604800
redis_instance
=
None
def
__init__
(
self
,
config
):
if
not
ResultStore
.
redis_instance
:
ResultStore
.
redis_instance
=
Redis
(
host
=
config
.
redis_host
,
port
=
config
.
redis_port
,
db
=
config
.
redis_database
,
password
=
config
.
redis_password
,
)
self
.
storage
=
ResultStore
.
redis_instance
def
store
(
self
,
key
,
points
):
result
=
self
.
serialize
(
points
)
logger
.
debug
(
"
Points found: %s
"
%
result
)
redis_key
=
"
thumbor-detector-%s
"
%
key
self
.
storage
.
setex
(
name
=
redis_key
,
value
=
result
,
time
=
2
*
self
.
WEEK
,
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment