makhtar7186 commited on
Commit
bcbdbf5
·
verified ·
1 Parent(s): a1aa950

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ # Set working directory
8
+ WORKDIR /app
9
+
10
+ # Copy .env file
11
+ COPY .env .
12
+
13
+ RUN python -m pip install --upgrade pip
14
+
15
+ # Copy requirements and install dependencies
16
+
17
+ COPY --chown=user ./requirements.txt requirements.txt
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy bot_telegram.py
21
+ COPY app.py .
22
+ COPY rag_core.py .
23
+ # Copy chroma_storage directory
24
+ COPY chroma_storage ./chroma_storage
25
+
26
+ # Expose any ports if needed (Telegram bot uses polling, no ports needed)
27
+
28
+ COPY --chown=user . /app
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]