tejaskkkk commited on
Commit
81c83c2
·
verified ·
1 Parent(s): 43e114d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -38
Dockerfile CHANGED
@@ -1,38 +1,38 @@
1
- FROM python:3.9-slim
2
-
3
- # Set working directory
4
- WORKDIR /app
5
-
6
- # Install system dependencies
7
- RUN apt-get update && apt-get install -y \
8
- gcc \
9
- g++ \
10
- && rm -rf /var/lib/apt/lists/*
11
-
12
- # Set environment variables for caching and logging
13
- ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
14
- ENV HF_HOME=/tmp/huggingface_hub
15
- ENV LOG_FILE=/tmp/logs/chatbot.log
16
- ENV PYTHONUNBUFFERED=1
17
- ENV HOST=0.0.0.0
18
- ENV PORT=7860
19
-
20
- # Create writable directories
21
- RUN mkdir -p /tmp/transformers_cache /tmp/huggingface_hub /tmp/logs
22
- RUN chmod 777 /tmp/transformers_cache /tmp/huggingface_hub /tmp/logs
23
-
24
- # Copy and install requirements
25
- COPY requirements.txt .
26
- RUN pip install --no-cache-dir -r requirements.txt
27
-
28
- # Copy application files
29
- COPY app.py .
30
- COPY utils.py .
31
- COPY config.py .
32
- COPY embeddings/ ./embeddings/
33
-
34
- # Expose port
35
- EXPOSE 7860
36
-
37
- # Run the application
38
- CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.12-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ gcc \
9
+ g++ \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set environment variables for caching and logging
13
+ ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
14
+ ENV HF_HOME=/tmp/huggingface_hub
15
+ ENV LOG_FILE=/tmp/logs/chatbot.log
16
+ ENV PYTHONUNBUFFERED=1
17
+ ENV HOST=0.0.0.0
18
+ ENV PORT=7860
19
+
20
+ # Create writable directories
21
+ RUN mkdir -p /tmp/transformers_cache /tmp/huggingface_hub /tmp/logs
22
+ RUN chmod 777 /tmp/transformers_cache /tmp/huggingface_hub /tmp/logs
23
+
24
+ # Copy and install requirements
25
+ COPY requirements.txt .
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # Copy application files
29
+ COPY app.py .
30
+ COPY utils.py .
31
+ COPY config.py .
32
+ COPY embeddings/ ./embeddings/
33
+
34
+ # Expose port
35
+ EXPOSE 7860
36
+
37
+ # Run the application
38
+ CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]