Spaces:
Runtime error
Runtime error
Commit
·
96ba4ea
1
Parent(s):
6ba9f8b
simplified the Dockerfile
Browse files- Dockerfile +13 -26
Dockerfile
CHANGED
@@ -1,45 +1,32 @@
|
|
1 |
-
|
2 |
-
# https://hub.docker.com/r/nikolaik/python-nodejs
|
3 |
-
FROM nikolaik/python-nodejs:python3.11-nodejs18
|
4 |
|
5 |
-
|
6 |
-
RUN apt-get install -y libc6
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
COPY ./requirements.txt /code/requirements.txt
|
11 |
|
12 |
-
RUN
|
13 |
|
14 |
-
|
15 |
-
# RUN pip install ctransformers --no-binary ctransformers
|
16 |
|
17 |
-
|
18 |
-
# RUN CT_CUBLAS=1 pip install ctransformers --no-binary ctransformers
|
19 |
|
20 |
-
|
21 |
-
RUN useradd -o -u 1000 user
|
22 |
|
23 |
-
|
24 |
USER user
|
25 |
-
|
26 |
-
# Set home to the user's home directory
|
27 |
ENV HOME=/home/user \
|
28 |
PATH=/home/user/.local/bin:$PATH
|
29 |
|
30 |
-
# Set the working directory to the user's home directory
|
31 |
WORKDIR $HOME/app
|
32 |
|
33 |
-
|
34 |
-
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
35 |
-
# where available (npm@5+)
|
36 |
-
COPY --chown=user package*.json $HOME/app
|
37 |
|
38 |
RUN npm install
|
39 |
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
-
COPY --chown=user . $HOME/app
|
43 |
|
44 |
-
EXPOSE 7860
|
45 |
CMD [ "npm", "run", "start" ]
|
|
|
1 |
+
FROM python:latest
|
|
|
|
|
2 |
|
3 |
+
ENV PYTHONUNBUFFERED 1
|
|
|
4 |
|
5 |
+
EXPOSE 7860
|
|
|
|
|
6 |
|
7 |
+
RUN apt update
|
8 |
|
9 |
+
RUN apt install curl
|
|
|
10 |
|
11 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
|
|
12 |
|
13 |
+
RUN apt install nodejs
|
|
|
14 |
|
15 |
+
RUN useradd -m -u 1000 user
|
16 |
USER user
|
|
|
|
|
17 |
ENV HOME=/home/user \
|
18 |
PATH=/home/user/.local/bin:$PATH
|
19 |
|
|
|
20 |
WORKDIR $HOME/app
|
21 |
|
22 |
+
COPY --chown=user package*.json .
|
|
|
|
|
|
|
23 |
|
24 |
RUN npm install
|
25 |
|
26 |
+
COPY requirements.txt ./
|
27 |
+
RUN pip install --upgrade pip && \
|
28 |
+
pip install -r requirements.txt
|
29 |
|
30 |
+
COPY --chown=user . .
|
|
|
31 |
|
|
|
32 |
CMD [ "npm", "run", "start" ]
|