THED2 commited on
Commit
2439405
·
verified ·
1 Parent(s): 7e93704

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Step 1: Base Image jisme Python aur Node/Pip pehle se ho
2
+ FROM python:3.10-slim
3
+
4
+ # Step 2: System utilities install karna
5
+ RUN apt-get update && apt-get install -y curl git && rm -rf /var/lib/apt/lists/*
6
+
7
+ # Step 3: Hugging Face free tier ke liye user setup (Root constraints se bachne ke liye)
8
+ RUN useradd -m -u 1000 user
9
+ USER user
10
+ ENV HOME=/home/user
11
+ ENV PATH=/home/user/.local/bin:$PATH
12
+
13
+ WORKDIR $HOME/app
14
+
15
+ # Step 4: 'uv' aur 'hermes-agent' install karna
16
+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
17
+ RUN pip install --no-cache-dir --user --upgrade hermes-agent
18
+
19
+ # Step 5: Apni main script aur files copy karna
20
+ COPY --chown=user . .
21
+
22
+ # Step 6: Hugging Face default port expose karna (Taaki web interface up rahe)
23
+ EXPOSE 7860
24
+
25
+ # Step 7: Bot run karne ka command
26
+ CMD ["python", "main.py"]