Skip to content

Commit

Permalink
Merge pull request #103 from chamathpali/master
Browse files Browse the repository at this point in the history
fix: docker and dependency updates
  • Loading branch information
chamathpali authored May 26, 2024
2 parents d4cf78a + 317c9f3 commit a1a7e43
Show file tree
Hide file tree
Showing 9 changed files with 11,446 additions and 6,031 deletions.
6 changes: 3 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM python:3.7-buster
WORKDIR /app

RUN \
echo "deb https://deb.nodesource.com/node_16.x buster main" > /etc/apt/sources.list.d/nodesource.list && \
echo "deb https://deb.nodesource.com/node_18.x buster main" > /etc/apt/sources.list.d/nodesource.list && \
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
apt-get update && \
apt-get install -yqq nodejs yarn && \
pip install -U pip && pip install pipenv && \
npm i -g npm@^8
npm i -g npm

RUN pip install --no-cache --upgrade pip setuptools

Expand All @@ -18,7 +18,7 @@ COPY . /app
RUN pip install --no-cache-dir -r requirements.txt

RUN npm ci
RUN npm install serverless
RUN npm install serverless@3.11.0 --legacy-peer-deps
RUN npm i -g nodemon
RUN npm install serverless-python-requirements

Expand Down
11,341 changes: 7,788 additions & 3,553 deletions api/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"core-util-is": "^1.0.2"
},
"devDependencies": {
"serverless-offline": "^8.5.0",
"serverless-offline": "^13.6.0",
"serverless-python-requirements": "^5.4.0",
"serverless-wsgi": "^1.7.4"
}
Expand Down
3 changes: 2 additions & 1 deletion other-services/angle-semantic-sim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:3.10.12
WORKDIR /app
COPY . /app
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir --upgrade --default-timeout=100 -r /app/requirements.txt
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
4 changes: 2 additions & 2 deletions other-services/ontology-sim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ RUN \
pip install -U pip && pip install pipenv && \
npm i -g npm@^8

RUN pip install --no-cache --upgrade pip setuptools
RUN pip install --no-cache --upgrade --default-timeout=100 pip setuptools

# Serverless part
COPY . /app

RUN pip install --no-cache-dir -r requirements.txt

RUN npm install
RUN npm install serverless
RUN npm install serverless@3.11.0 --legacy-peer-deps
RUN npm i -g nodemon
RUN npm install serverless-python-requirements

Expand Down
5 changes: 3 additions & 2 deletions other-services/semantic-sim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:3.9
FROM python:3.10.12
WORKDIR /app
COPY . /app
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir --default-timeout=100 --upgrade -r /app/requirements.txt
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
11 changes: 7 additions & 4 deletions other-services/use-vector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:17-alpine as build
FROM node:20-alpine as build

WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
Expand All @@ -8,10 +8,13 @@ COPY serverless.yml /app
COPY package.json /app
COPY package-lock.json /app
COPY . /app
RUN npm ci
RUN npm install serverless
RUN npm config set fetch-timeout 60000
RUN npm config set fetch-retries 5
RUN npm config set fetch-retry-factor 10
RUN npm ci --legacy-peer-deps
RUN npm install serverless@3.11.0 --legacy-peer-deps


EXPOSE 4100

CMD ["node", "./node_modules/serverless/bin/serverless.js", "offline", "start", "--host", "0.0.0.0"]
CMD ["npx", "serverless", "offline", "start", "--host", "0.0.0.0"]
Loading

0 comments on commit a1a7e43

Please sign in to comment.