Skip to content

Commit

Permalink
Merge branch 'features/worker' of https://github.com/Tiledesk/tiledes…
Browse files Browse the repository at this point in the history
…k-llm into features/worker
  • Loading branch information
Giovanni Troisi committed May 27, 2024
2 parents 34f4112 + c123f82 commit f651faa
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
45 changes: 44 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# STAGE 1: LLM
FROM python:3.10

WORKDIR /tiledesk-llm
Expand All @@ -23,5 +24,47 @@ EXPOSE 8000
COPY entrypoint.sh /tiledesk-llm/entrypoint.sh
RUN chmod +x /tiledesk-llm/entrypoint.sh

ENTRYPOINT ["/tiledesk-llm/entrypoint.sh"]
# STAGE 2: WORKER

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs

####
RUN npm install -g [email protected]

#RUN sed -i 's/stable\/updates/stable-security\/updates/' /etc/apt/sources.list

RUN apt-get update

# Create app directory
WORKDIR /usr/src/app
COPY ./worker .


ARG NPM_TOKEN

RUN if [ "$NPM_TOKEN" ]; \
then RUN COPY .npmrc_ .npmrc \
else export SOMEVAR=world; \
fi


# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY worker/package*.json ./

RUN npm install --production



RUN rm -f .npmrc

# Bundle app source
#COPY . .

WORKDIR /tiledesk-llm

EXPOSE 3009

ENTRYPOINT ["sh","-c","/tiledesk-llm/entrypoint.sh & node /usr/src/app/index.js"]
6 changes: 4 additions & 2 deletions __Dockerfile_2
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ RUN apt-get update

# Create app directory
WORKDIR /usr/src/app
COPY ./worker .


ARG NPM_TOKEN

Expand All @@ -59,10 +61,10 @@ RUN npm install --production
RUN rm -f .npmrc

# Bundle app source
COPY . .
#COPY . .

WORKDIR /tiledesk-llm

EXPOSE 3009

ENTRYPOINT ["/tiledesk-llm/entrypoint.sh", "&", "node", "/usr/src/app/index.js"]
ENTRYPOINT ["sh","-c","/tiledesk-llm/entrypoint.sh & node /usr/src/app/index.js"]

0 comments on commit f651faa

Please sign in to comment.