Maksym Batiuk commited on
Commit
f8f7268
β€’
1 Parent(s): f33e875

Adjusted Dockerfile and README.md

Browse files
Files changed (2) hide show
  1. Dockerfile +13 -14
  2. README.md +5 -8
Dockerfile CHANGED
@@ -2,7 +2,7 @@
2
  FROM python:3.12
3
 
4
  # Set working directory inside the container
5
- WORKDIR /app/rag-system
6
 
7
  # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
@@ -12,14 +12,22 @@ RUN apt-get update && apt-get install -y \
12
  && apt-get clean \
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
15
  RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
16
 
17
-
18
  # Install Poetry
19
  RUN pip install --no-cache-dir poetry
20
 
21
- # Copy project files
22
  COPY poetry.lock pyproject.toml /app/
 
 
 
 
 
 
 
 
23
  COPY rag-system /app/rag-system/
24
 
25
  # Set environment variables
@@ -28,17 +36,8 @@ ENV TOKENIZERS_PARALLELISM=false
28
  ENV TORCH_CPP_LOG_LEVEL=ERROR
29
  ENV PYTORCH_DISABLE_SYSTEM_MONITORING=1
30
 
31
- # Configure Poetry
32
- RUN poetry config virtualenvs.create false
33
-
34
- # Install dependencies with Poetry
35
- RUN poetry install --no-root --no-dev
36
-
37
- # Run preprocessing
38
- RUN python3 -m src.preprocessing
39
-
40
  # Expose the app's default port
41
  EXPOSE 7860
42
 
43
- # Command to start the app
44
- CMD ["python3", "app.py"]
 
2
  FROM python:3.12
3
 
4
  # Set working directory inside the container
5
+ WORKDIR /app
6
 
7
  # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
 
12
  && apt-get clean \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install PyTorch (CPU version)
16
  RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
17
 
 
18
  # Install Poetry
19
  RUN pip install --no-cache-dir poetry
20
 
21
+ # Copy dependency files
22
  COPY poetry.lock pyproject.toml /app/
23
+
24
+ # Configure Poetry
25
+ RUN poetry config virtualenvs.create false
26
+
27
+ # Install project dependencies using Poetry
28
+ RUN poetry install --no-root --no-dev
29
+
30
+ # Copy the rest of the project files
31
  COPY rag-system /app/rag-system/
32
 
33
  # Set environment variables
 
36
  ENV TORCH_CPP_LOG_LEVEL=ERROR
37
  ENV PYTORCH_DISABLE_SYSTEM_MONITORING=1
38
 
 
 
 
 
 
 
 
 
 
39
  # Expose the app's default port
40
  EXPOSE 7860
41
 
42
+ # Command to start the Gradio app
43
+ CMD ["python3", "rag-system/app.py"]
README.md CHANGED
@@ -1,11 +1,8 @@
1
  ---
2
- title: RAG-Question-Answering-System
3
- emoji: 🧠
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 3.23.0
8
- app_file: rag-system/app.py
9
  pinned: false
10
  ---
11
-
 
1
  ---
2
+ title: RAG Question Answering System
3
+ emoji: 🌍
4
+ colorFrom: yellow
5
+ colorTo: indigo
6
+ sdk: docker
 
 
7
  pinned: false
8
  ---