ItsCxdy commited on
Commit
e34bab4
·
verified ·
1 Parent(s): ee08b99

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -17
Dockerfile CHANGED
@@ -1,18 +1,24 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker# you will also find guides on how best to write your Dockerfile
2
- FROM python:3.10-slim
3
-
4
- # Set the working directory in the container
5
- WORKDIR /app
6
-
7
- # Copy the dependency file and install dependencies
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
10
-
11
- # Copy the rest of the application files (including vector_db)
12
- COPY . .
13
-
14
- # Grant execution permissions to the run script
15
- RUN chmod +x run.sh
16
-
17
- # This tells the container what command to run when it starts
 
 
 
 
 
 
18
  ENTRYPOINT ["./run.sh"]
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # --- START DNS FIX ---
5
+ # This line ensures the container uses Google's public DNS (8.8.8.8)
6
+ # for reliable hostname resolution, which should prevent the [Errno -5] error.
7
+ RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf
8
+ # --- END DNS FIX ---
9
+
10
+ # Set the working directory in the container
11
+ WORKDIR /app
12
+
13
+ # Copy the dependency file and install dependencies
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the rest of the application files (including vector_db and telegram_bot.py)
18
+ COPY . .
19
+
20
+ # Grant execution permissions to the run script
21
+ RUN chmod +x run.sh
22
+
23
+ # This tells the container what command to run when it starts
24
  ENTRYPOINT ["./run.sh"]