HSR-DeepThink commited on
Commit
aadd69d
·
verified ·
1 Parent(s): b7cd6ea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -23,7 +23,12 @@
23
 
24
  FROM python:3.10-slim
25
 
26
- # Set up the strict Hugging Face user permissions
 
 
 
 
 
27
  RUN useradd -m -u 1000 user
28
  USER user
29
  ENV HOME=/home/user \
@@ -31,13 +36,10 @@ ENV HOME=/home/user \
31
 
32
  WORKDIR $HOME/app
33
 
34
- # Copy requirement parameters first
35
  COPY --chown=user requirements.txt $HOME/app/requirements.txt
36
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
37
 
38
- # Copy all repository code with user ownership permissions
39
  COPY --chown=user . $HOME/app
40
 
41
- # Start using our python server wrapper
42
  CMD ["python", "app.py"]
43
 
 
23
 
24
  FROM python:3.10-slim
25
 
26
+ # Install system dependencies and stockfish engine binary
27
+ RUN apt-get update && apt-get install -y \
28
+ stockfish \
29
+ && rm -rf /lib/apt/lists/*
30
+
31
+ # Set up the exact Hugging Face user permissions
32
  RUN useradd -m -u 1000 user
33
  USER user
34
  ENV HOME=/home/user \
 
36
 
37
  WORKDIR $HOME/app
38
 
 
39
  COPY --chown=user requirements.txt $HOME/app/requirements.txt
40
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
41
 
 
42
  COPY --chown=user . $HOME/app
43
 
 
44
  CMD ["python", "app.py"]
45