Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +25 -3
Dockerfile
CHANGED
@@ -1,4 +1,26 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
#
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
|
3 |
+
# Install dependencies
|
4 |
+
RUN apt-get update && apt-get install -y curl && \
|
5 |
+
curl -fsSL https://ollama.ai/install.sh | sh && \
|
6 |
+
apt-get clean && rm -rf /var/lib/apt/lists/*
|
7 |
+
|
8 |
+
# Create a user
|
9 |
+
RUN useradd user
|
10 |
+
USER user
|
11 |
+
ENV HOME=/home/user
|
12 |
+
WORKDIR $HOME/app
|
13 |
+
|
14 |
+
# Copy files
|
15 |
+
COPY --chown=user requirements.txt .
|
16 |
+
RUN pip install -r requirements.txt
|
17 |
+
COPY --chown=user . .
|
18 |
+
# Copy files
|
19 |
+
# Make the script executable
|
20 |
+
RUN chmod +x start.sh
|
21 |
+
|
22 |
+
# Expose the port
|
23 |
+
EXPOSE 7860
|
24 |
+
|
25 |
+
# Start the application
|
26 |
+
CMD ["./start.sh"]
|