restrict urllib3 version for lambda

This commit is contained in:
Khalim Conn-Kowlessar 2023-07-21 18:47:57 +01:00
parent 3baa8a5ca6
commit 06672e6505
3 changed files with 6 additions and 17 deletions

View file

@ -26,8 +26,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r backend/requirements/base.txt
pip install -r model_data/requirements/requirements.txt
- name: AWS credentials for dev - name: AWS credentials for dev
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'

View file

@ -1,22 +1,12 @@
FROM public.ecr.aws/lambda/python:3.10 # Pull base image
FROM python:3.10.12-slim-buster
# Set environment variables # Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
# Set work directory # Set work directory to the root of your project
WORKDIR /app WORKDIR /Model
# Install system dependencies # Install system dependencies
#RUN apt-get update && apt-get install -y netcat-openbsd RUN apt-get update && apt-get install -y netcat-openbsd
# Install python dependencies
COPY ./requirements/base.txt ./requirements/base.txt
RUN pip install --upgrade pip
RUN pip install -r requirements/base.txt
# Copy project
COPY . .
# command to run on container start
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

View file

@ -24,5 +24,6 @@ starlette==0.27.0
typing_extensions==4.7.1 typing_extensions==4.7.1
uvicorn==0.22.0 uvicorn==0.22.0
uvloop==0.17.0 uvloop==0.17.0
urllib3<2
watchfiles==0.19.0 watchfiles==0.19.0
websockets==11.0.3 websockets==11.0.3