XY26 commited on
Commit
f4533e3
·
verified ·
1 Parent(s): af27b58

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.10
2
 
3
- # Set up user to meet Hugging Face security requirements
4
  RUN useradd -m -u 1000 user
5
  USER user
6
  ENV HOME=/home/user \
@@ -10,8 +10,10 @@ WORKDIR $HOME/app
10
 
11
  COPY --chown=user . $HOME/app
12
 
13
- # Update pip and install requirements
14
- RUN pip install --no-cache-dir --upgrade pip && \
15
- pip install --no-cache-dir -r requirements.txt
 
 
16
 
17
  CMD ["python", "app.py"]
 
1
  FROM python:3.10
2
 
3
+ # 1. Setup User (Hugging Face Security Requirement)
4
  RUN useradd -m -u 1000 user
5
  USER user
6
  ENV HOME=/home/user \
 
10
 
11
  COPY --chown=user . $HOME/app
12
 
13
+ # 2. Upgrade pip to ensure it picks the correct "Manylinux" wheel (fixes the musl error)
14
+ RUN pip install --no-cache-dir --upgrade pip
15
+
16
+ # 3. Install dependencies from requirements.txt
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
 
19
  CMD ["python", "app.py"]