Skip to content

Commit

Permalink
reduce image
Browse files Browse the repository at this point in the history
  • Loading branch information
arodik committed May 10, 2024
1 parent d6b03a2 commit 6e0b491
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
22 changes: 14 additions & 8 deletions embedding-calculator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ RUN apt-get update && apt-get install -y build-essential cmake git wget unzip \
libaec-dev libblosc-dev libbrotli-dev libbz2-dev libgif-dev libopenjp2-7-dev \
liblcms2-dev libcharls-dev libjxr-dev liblz4-dev libcfitsio-dev libpcre3 libpcre3-dev \
libsnappy-dev libwebp-dev libzopfli-dev libzstd-dev \
&& rm -rf /var/lib/apt/lists/*
&& apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3.8-dev python3-pip python3.8-distutils &&\
apt-get autoremove && \
rm -rf /var/lib/apt/lists/*



# Update package lists and install necessary dependencies
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3.8-dev python3-pip python3.8-distutils
#RUN apt-get update && \
# apt-get install -y software-properties-common && \
# add-apt-repository -y ppa:deadsnakes/ppa && \
# apt-get update && \
# apt-get install -y python3.8 python3.8-dev python3-pip python3.8-distutils

# Set symbolic links for python and pip to use Python 3.8 by default
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
Expand Down Expand Up @@ -70,8 +76,8 @@ COPY requirements.txt .
# which is not compatible with Python 3.7


RUN pip --no-cache-dir install $(grep ^numpy requirements.txt)
RUN pip --no-cache-dir install -r requirements.txt
RUN pip --no-cache-dir install $(grep ^numpy requirements.txt) && \
pip --no-cache-dir install -r requirements.txt

ARG BE_VERSION
ARG APP_VERSION_STRING
Expand Down
2 changes: 1 addition & 1 deletion embedding-calculator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ iniconfig==2.0.0
itsdangerous==2.0.1
Jinja2==3.0.3
jsonschema==4.17.3
Keras-Preprocessing==1.1.2
#Keras-Preprocessing==1.1.2
kiwisolver==1.4.4
Markdown==3.4.4
MarkupSafe==2.1.3
Expand Down
4 changes: 2 additions & 2 deletions embedding-calculator/src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class ENV(Constants):
PYTORCH_MODE = get_env_bool('PYTORCH_MODE', True) # True or False
DEVICE = get_env('DEVICE', 'cpu') # 'cpu' or 'cuda:0'
RECOGNITION_MODEL = get_env('RECOGNITION_MODEL', 'ir_50')
RECOGNITION_MODEL_PATH = get_env('RECOGNITION_MODEL_PATH', 'src/services/facescan/plugins/adaface/pretrained/adaface_ir50_ms1mv2.ckpt')
RECOGNITION_MODEL_PATH = get_env('RECOGNITION_MODEL_PATH', 'src/services/facescan/plugins/adaface/pretrained/adaface_ir101_webface4m.ckpt')
DETECTOR_NAME = get_env('DETECTOR_NAME', 'retinaface') # mtcnn or retinaface
DETECTOR_NETWORK_NAME = get_env('DETECTOR_NETWORK_NAME', 'mobile0.25') # 'mobile0.25' or 'resnet50'
DETECTOR_NETWORK_NAME = get_env('DETECTOR_NETWORK_NAME', 'resnet50') # 'mobile0.25' or 'resnet50'
DETECTOR_MODEL_PATH = get_env('DETECTOR_MODEL_PATH', 'src/services/facescan/plugins/pytorch_detector/weights/mobilenet0.25_Final.pth')
PRETRAINED_MODEL_PATH = get_env('PRETRAINED_MODEL_PATH', 'src/services/facescan/plugins/pytorch_detector/weights/mobilenetV1X0.25_pretrain.tar')

Expand Down

0 comments on commit 6e0b491

Please sign in to comment.