diff --git a/Dockerfile b/Dockerfile index 211ba47..40abb6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8.10-slim-buster +FROM python:3.8.11-slim-buster ENV PYTHONUNBUFFERED 1 RUN apt-get update \ && apt-get install -y make \ @@ -8,8 +8,8 @@ RUN mkdir -p /app WORKDIR /app COPY requirements.txt /app RUN python3 -m venv . -RUN python3 -m pip install pip==21.1.2 -RUN python3 -m pip install setuptools==57.0.0 +RUN python3 -m pip install pip==21.2.4 +RUN python3 -m pip install setuptools==57.4.0 RUN python3 -m pip install --no-cache-dir -r requirements.txt COPY ./app /app EXPOSE 5000 diff --git a/README.md b/README.md index f9f38d9..f641659 100644 --- a/README.md +++ b/README.md @@ -21,17 +21,17 @@ The goal is to deploy on [Flask] a [deep learning] model as a microservice. The The code has been tested using: * [Python] (3.8): an interpreted high-level programming language for general-purpose programming. -* [Jupyter Lab] (3.0.16): a web-based interactive development environment for [Jupyter Notebooks], code and data. +* [Jupyter Lab] (3.1.6): a web-based interactive development environment for [Jupyter Notebooks], code and data. * [Flask] (2.0.1): a microframework for [Python] based on Werkzeug, Jinja 2 and good intentions. * [Gunicorn] (20.1.0): a [Python] [WSGI] HTTP Server for UNIX. -* [NGINX] (1.21.0): a free, open-source, high-performance HTTP server, reverse proxy, and IMAP/POP3 proxy server. +* [NGINX] (1.21.1): a free, open-source, high-performance HTTP server, reverse proxy, and IMAP/POP3 proxy server. * [Docker] (19.03.13-ce): an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud. * [Docker-Compose] (1.29.2): a tool for defining and running multi-container [Docker] applications. * [Keras] ([TensorFlow] built-in): a high-level neural networks [API], written in [Python] and capable of running on top of [TensorFlow]. -* [TensorFlow] (2.5.0): an open source software [Deep Learning] library for high performance numerical computation using data flow graphs. -* [Matplotlib] (3.4.2): a plotting library for [Python] and its numerical mathematics extension [NumPy]. +* [TensorFlow] (2.6.0): an open source software [Deep Learning] library for high performance numerical computation using data flow graphs. +* [Matplotlib] (3.4.3): a plotting library for [Python] and its numerical mathematics extension [NumPy]. * [NumPy] (1.19.5): a library for [Python], adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. -* [scikit-image] (0.18.1): a collection of algorithms for image processing with [Python]. +* [scikit-image] (0.18.2): a collection of algorithms for image processing with [Python]. ### PYTHON VIRTUAL ENVIRONMENT @@ -43,8 +43,8 @@ Command to configure virtual environment with [venv]: ```bash ~/deeplearning_flask$ python3 -m venv dlflask38 ~/deeplearning_flask$ source dlflask38/bin/activate -(dlflask38)~/deeplearning_flask$ python3 -m pip install pip==21.1.2 -(dlflask38)~/deeplearning_flask$ python3 -m pip install setuptools==57.0.0 +(dlflask38)~/deeplearning_flask$ python3 -m pip install pip==21.2.4 +(dlflask38)~/deeplearning_flask$ python3 -m pip install setuptools==57.4.0 (dlflask38)~/deeplearning_flask$ python3 -m pip install -r requirements.txt ``` diff --git a/docker-compose.yml b/docker-compose.yml index e5c2d76..4155564 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - nginx_network nginx: - image: nginx:1.21.0-alpine + image: nginx:1.21.1-alpine ports: - 80:80 volumes: diff --git a/nginx/conf.d/local.conf b/nginx/conf.d/local.conf index 74a2600..ffc788b 100644 --- a/nginx/conf.d/local.conf +++ b/nginx/conf.d/local.conf @@ -10,6 +10,9 @@ server { listen 80; server_name localhost; + client_body_buffer_size 4M; + client_max_body_size 4M; + location / { # all passed to Gunicorn proxy_pass http://web_server; diff --git a/requirements.txt b/requirements.txt index 79cb913..f234d0d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ Flask==2.0.1 gunicorn==20.1.0 -jupyterlab==3.0.16 -matplotlib==3.4.2 +jupyterlab==3.1.6 +matplotlib==3.4.3 numpy==1.19.5 -Pillow==8.2.0 +Pillow==8.3.1 pytest==6.2.4 -requests==2.25.1 -scikit-image==0.18.1 -tensorflow==2.5.0 +requests==2.26.0 +scikit-image==0.18.2 +tensorflow==2.6.0