mitulagr2 commited on
Commit
ac693fd
1 Parent(s): a777112

Update Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -7
  2. start_service.sh +1 -1
Dockerfile CHANGED
@@ -10,9 +10,6 @@ COPY ./requirements.txt /code/requirements.txt
10
  #
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
- #
14
- # USER root
15
-
16
  #
17
  COPY ./start_service.sh /code/start_service.sh
18
 
@@ -20,20 +17,22 @@ COPY ./start_service.sh /code/start_service.sh
20
  COPY ./app /code/app
21
 
22
  #
23
- RUN apt-get update && apt-get install -y sudo
24
 
25
  # RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
26
 
 
 
27
  #
28
  EXPOSE 7860
29
 
30
- USER root
31
 
32
  #
33
- RUN chmod a+x /code/start_service.sh
34
 
35
  # # Run .sh file
36
- CMD ["/code/start_service.sh"]
37
 
38
  #
39
  # CMD ["fastapi", "run", "app/main.py", "--port", "80"]
 
10
  #
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
 
 
 
13
  #
14
  COPY ./start_service.sh /code/start_service.sh
15
 
 
17
  COPY ./app /code/app
18
 
19
  #
20
+ # RUN apt-get update && apt-get install -y sudo
21
 
22
  # RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
23
 
24
+ RUN curl -fsSL https://ollama.com/install.sh | sh
25
+
26
  #
27
  EXPOSE 7860
28
 
29
+ # USER root
30
 
31
  #
32
+ # RUN chmod a+x /code/start_service.sh
33
 
34
  # # Run .sh file
35
+ ENTRYPOINT ["sh", "/code/start_service.sh"]
36
 
37
  #
38
  # CMD ["fastapi", "run", "app/main.py", "--port", "80"]
start_service.sh CHANGED
@@ -1,7 +1,7 @@
1
  #!/bin/sh
2
 
3
  #
4
- sudo curl -fsSL https://ollama.com/install.sh | sh
5
 
6
  # Start Ollama in the background
7
  ollama serve &
 
1
  #!/bin/sh
2
 
3
  #
4
+ # curl -fsSL https://ollama.com/install.sh | sh
5
 
6
  # Start Ollama in the background
7
  ollama serve &