jbilcke-hf HF staff commited on
Commit
25db05b
1 Parent(s): aefceb0

improve the template by using a Python + Node image

Browse files
Files changed (3) hide show
  1. Dockerfile +5 -3
  2. README.md +1 -0
  3. requirements.txt +1 -0
Dockerfile CHANGED
@@ -1,4 +1,6 @@
1
- FROM node:18
 
 
2
 
3
  # Set up a new user named "user" with user ID 1000
4
  RUN useradd -o -u 1000 user
@@ -20,8 +22,8 @@ COPY --chown=user package*.json $HOME/app
20
 
21
  RUN npm install
22
 
23
- # Install ctransformers
24
- RUN pip install ctransformers
25
 
26
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
27
  COPY --chown=user . $HOME/app
 
1
+ # pick your favorite Python + Node bundle from here:
2
+ # https://hub.docker.com/r/nikolaik/python-nodejs
3
+ FROM nikolaik/python-nodejs:python3.11-nodejs18
4
 
5
  # Set up a new user named "user" with user ID 1000
6
  RUN useradd -o -u 1000 user
 
22
 
23
  RUN npm install
24
 
25
+ COPY requirements.txt requirements.txt
26
+ RUN pip install -r requirements.txt
27
 
28
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
29
  COPY --chown=user . $HOME/app
README.md CHANGED
@@ -57,6 +57,7 @@ npm run docker
57
  This script is a shortcut executing the following commands:
58
 
59
  ```bash
 
60
  docker build -t template-node-python-express .
61
  docker run -it -p 7860:7860 template-node-python-express
62
  ```
 
57
  This script is a shortcut executing the following commands:
58
 
59
  ```bash
60
+ docker pull nikolaik/python-nodejs
61
  docker build -t template-node-python-express .
62
  docker run -it -p 7860:7860 template-node-python-express
63
  ```
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ctransformers==0.2.9