theaniketgiri commited on
Commit
3d5a5fe
·
1 Parent(s): c5d0126
Files changed (2) hide show
  1. Dockerfile +10 -11
  2. docker_entrypoint.sh +4 -9
Dockerfile CHANGED
@@ -13,7 +13,6 @@ RUN apt-get update && apt-get install -y \
13
  libgconf-2-4 \
14
  libnss3 \
15
  libxss1 \
16
- libappindicator1 \
17
  fonts-liberation \
18
  libasound2 \
19
  libatk-bridge2.0-0 \
@@ -21,18 +20,18 @@ RUN apt-get update && apt-get install -y \
21
  && rm -rf /var/lib/apt/lists/*
22
 
23
  # Install Google Chrome
24
- RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
25
- echo "deb [arch amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
26
- apt-get update && \
27
- apt-get install -y google-chrome-stable && \
28
- rm -rf /var/lib/apt/lists/*
29
 
30
  # Install ChromeDriver
31
- RUN CHROME_VERSION=$(google-chrome --version | awk '{print $3}') && \
32
- CHROMEDRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION%.*}) && \
33
- wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip && \
34
- unzip /tmp/chromedriver.zip -d /usr/local/bin/ && \
35
- rm /tmp/chromedriver.zip
36
 
37
  # Install Python dependencies
38
  RUN pip install --upgrade pip && \
 
13
  libgconf-2-4 \
14
  libnss3 \
15
  libxss1 \
 
16
  fonts-liberation \
17
  libasound2 \
18
  libatk-bridge2.0-0 \
 
20
  && rm -rf /var/lib/apt/lists/*
21
 
22
  # Install Google Chrome
23
+ # RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
24
+ # echo "deb [arch amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
25
+ # apt-get update && \
26
+ # apt-get install -y google-chrome-stable && \
27
+ # rm -rf /var/lib/apt/lists/*
28
 
29
  # Install ChromeDriver
30
+ # RUN CHROME_VERSION=$(google-chrome --version | awk '{print $3}') && \
31
+ # CHROMEDRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION%.*}) && \
32
+ # wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip && \
33
+ # unzip /tmp/chromedriver.zip -d /usr/local/bin/ && \
34
+ # rm /tmp/chromedriver.zip
35
 
36
  # Install Python dependencies
37
  RUN pip install --upgrade pip && \
docker_entrypoint.sh CHANGED
@@ -1,10 +1,5 @@
1
- #!/bin/sh
 
2
 
3
- # Start continual training loop in background
4
- python src/continual_train_loop.py &
5
-
6
- # Start web scraper in background
7
- python src/web_scraper.py &
8
-
9
- # Start FastAPI server (foreground)
10
- uvicorn src.api:app --host 0.0.0.0 --port 8000 --reload
 
1
+ #!/bin/bash
2
+ set -e
3
 
4
+ # Only start the FastAPI server
5
+ exec uvicorn src.api:app --host 0.0.0.0 --port 8000