fixed dockerfile
Browse files- Dockerfile +6 -3
- startup.sh +7 -0
Dockerfile
CHANGED
@@ -9,7 +9,10 @@ WORKDIR /app
|
|
9 |
COPY --chown=user ./requirements.txt requirements.txt
|
10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
11 |
|
12 |
-
|
|
|
13 |
|
14 |
-
COPY --chown=user . /app
|
15 |
-
|
|
|
|
|
|
9 |
COPY --chown=user ./requirements.txt requirements.txt
|
10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
11 |
|
12 |
+
# Ensure `ollama` is installed
|
13 |
+
RUN python -m pip show ollama
|
14 |
|
15 |
+
COPY --chown=user ./startup.sh /app/startup.sh
|
16 |
+
RUN chmod +x /app/startup.sh
|
17 |
+
|
18 |
+
CMD ["/app/startup.sh"]
|
startup.sh
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Pull the Ollama model
|
4 |
+
python -m ollama run gemma2:2b
|
5 |
+
|
6 |
+
# Start the application
|
7 |
+
exec uvicorn app:app --host 0.0.0.0 --port 7860
|