AEUPH commited on
Commit
9893785
·
verified ·
1 Parent(s): e55f763

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Copy requirements and install
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # Create a user to avoid running as root (HF requirement)
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+
16
+ # Copy the monolith to the container
17
+ COPY --chown=user . .
18
+
19
+ # Expose the standard Hugging Face port
20
+ EXPOSE 7860
21
+
22
+ # Launch the Monolith
23
+ CMD ["python", "app.py"]