JarvisChan630 commited on
Commit
769758a
·
1 Parent(s): 6aff0ae
Files changed (2) hide show
  1. Dockerfile +10 -5
  2. README.md +3 -0
Dockerfile CHANGED
@@ -1,14 +1,19 @@
1
  # Dockerfile for Jar3d
2
  FROM python:3.11-slim
3
 
4
- # USER root
 
 
 
 
 
5
 
6
  # Set working directory
7
- WORKDIR /app
8
 
9
- # Set environment variables
10
- ENV HOME=/app \
11
- PATH=/app/.local/bin:$PATH
12
 
13
  # Install minimal required build tools and dependencies for Playwright
14
  RUN apt-get update && apt-get install -y \
 
1
  # Dockerfile for Jar3d
2
  FROM python:3.11-slim
3
 
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV HOME=/home/user \
7
+ PATH=/home/user/.local/bin:$PATH
8
+ WORKDIR $HOME/app
9
+ COPY --chown=user . $HOME/app
10
 
11
  # Set working directory
12
+ # WORKDIR /app
13
 
14
+ # # Set environment variables
15
+ # ENV HOME=/app \
16
+ # PATH=/app/.local/bin:$PATH
17
 
18
  # Install minimal required build tools and dependencies for Playwright
19
  RUN apt-get update && apt-get install -y \
README.md CHANGED
@@ -25,6 +25,9 @@ Thanks John Adeojo, who brings this wonderful project to open source community!
25
  - docker
26
  - Hugging Face deploy
27
 
 
 
 
28
  ## TODO
29
  [] fix local docker bugs,local test
30
  [] deploy to Huggingface
 
25
  - docker
26
  - Hugging Face deploy
27
 
28
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
29
+
30
+
31
  ## TODO
32
  [] fix local docker bugs,local test
33
  [] deploy to Huggingface