sam-785 commited on
Commit
bc99269
·
verified ·
1 Parent(s): 84eb25a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # System updates and build tools
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ python3-dev \
7
+ cmake \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # User permissions for Hugging Face
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV PATH="/home/user/.local/bin:${PATH}"
14
+
15
+ WORKDIR /app
16
+
17
+ # Requirements install
18
+ COPY --chown=user requirements.txt .
19
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
20
+
21
+ # Copy all files
22
+ COPY --chown=user . .
23
+
24
+ # Launch the app
25
+ CMD ["python", "app.py"]