mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
correct docker image
This commit is contained in:
parent
2fd169873a
commit
d6c29cc516
1 changed files with 10 additions and 10 deletions
|
|
@ -1,7 +1,3 @@
|
||||||
# Some additional work is required to get mip to run on arm64 architecture.
|
|
||||||
# This is because the mip library relies on the CBC solver, which is not available for arm64.
|
|
||||||
# https://python-mip.readthedocs.io/en/latest/install.html
|
|
||||||
|
|
||||||
# Pull base image
|
# Pull base image
|
||||||
FROM python:3.10.12-slim-buster as build-image
|
FROM python:3.10.12-slim-buster as build-image
|
||||||
|
|
||||||
|
|
@ -10,17 +6,21 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Set work directory to the root of your project
|
# Set work directory to the root of your project
|
||||||
WORKDIR /var/task/Model
|
WORKDIR var/task/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
|
# Install python dependencies
|
||||||
COPY ./backend/requirements/base.txt ./backend/requirements/base.txt
|
COPY ./backend/requirements/base.txt ./backend/requirements/base.txt
|
||||||
RUN pip install --upgrade pip \
|
RUN pip install --upgrade pip
|
||||||
&& pip install -r backend/requirements/base.txt && rm -rf /root/.cache
|
# Install and clean up temp caches
|
||||||
|
RUN pip install -r backend/requirements/base.txt && rm -rf /root/.cache
|
||||||
|
|
||||||
# Install the AWS Lambda RIC
|
# Since we are not using a base AWS image, there is some additional setup required. We need to set up the runtime
|
||||||
|
# interface client
|
||||||
|
# https://docs.aws.amazon.com/lambda/latest/dg/python-image.html#python-image-clients
|
||||||
|
# Additionally install the AWS Lambda RIC
|
||||||
RUN pip install awslambdaric
|
RUN pip install awslambdaric
|
||||||
|
|
||||||
# Second stage: "runtime-image"
|
# Second stage: "runtime-image"
|
||||||
|
|
@ -48,4 +48,4 @@ COPY ./utils/ ./utils/
|
||||||
# Set the ENTRYPOINT to the AWS Lambda RIC and CMD to your function handler
|
# Set the ENTRYPOINT to the AWS Lambda RIC and CMD to your function handler
|
||||||
ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
|
ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
|
||||||
# Define the handler location
|
# Define the handler location
|
||||||
CMD ["backend.app.main.handler"]
|
CMD ["backend.app.main.handler"]
|
||||||
Loading…
Add table
Reference in a new issue