diff --git a/.github/workflows/deploy_fastapi_backend.yml b/.github/workflows/deploy_fastapi_backend.yml index 290a9830..aefd3d07 100644 --- a/.github/workflows/deploy_fastapi_backend.yml +++ b/.github/workflows/deploy_fastapi_backend.yml @@ -26,8 +26,6 @@ jobs: - name: Install dependencies run: | 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 if: github.ref == 'refs/heads/dev' diff --git a/backend/docker/lambda.Dockerfile b/backend/docker/lambda.Dockerfile index f64eec03..40a1e927 100644 --- a/backend/docker/lambda.Dockerfile +++ b/backend/docker/lambda.Dockerfile @@ -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 ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 -# Set work directory -WORKDIR /app +# Set work directory to the root of your project +WORKDIR /Model # Install system dependencies -#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"] +RUN apt-get update && apt-get install -y netcat-openbsd \ No newline at end of file diff --git a/backend/requirements/base.txt b/backend/requirements/base.txt index 729b37f3..9588009b 100644 --- a/backend/requirements/base.txt +++ b/backend/requirements/base.txt @@ -24,5 +24,6 @@ starlette==0.27.0 typing_extensions==4.7.1 uvicorn==0.22.0 uvloop==0.17.0 +urllib3<2 watchfiles==0.19.0 websockets==11.0.3 \ No newline at end of file