Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
# Define the base image
|
2 |
FROM python:3.9
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Set environment variables
|
5 |
ENV EMBED_DEVICE_CHOICE="cpu" \
|
6 |
PYTHONUNBUFFERED=1
|
@@ -17,10 +21,10 @@ RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
17 |
WORKDIR /app
|
18 |
|
19 |
# Copy application files
|
20 |
-
COPY . /app
|
21 |
|
22 |
# Install Python dependencies
|
23 |
-
COPY requirements.txt
|
24 |
RUN pip install --no-cache-dir -r /app/requirements.txt
|
25 |
|
26 |
# Expose port for the Gradio app
|
|
|
1 |
# Define the base image
|
2 |
FROM python:3.9
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
7 |
+
|
8 |
# Set environment variables
|
9 |
ENV EMBED_DEVICE_CHOICE="cpu" \
|
10 |
PYTHONUNBUFFERED=1
|
|
|
21 |
WORKDIR /app
|
22 |
|
23 |
# Copy application files
|
24 |
+
COPY --chown=user . /app
|
25 |
|
26 |
# Install Python dependencies
|
27 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
28 |
RUN pip install --no-cache-dir -r /app/requirements.txt
|
29 |
|
30 |
# Expose port for the Gradio app
|