Build Update
Browse files- Dockerfile +2 -8
Dockerfile
CHANGED
|
@@ -2,30 +2,24 @@ FROM python:3.11-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# Set environment variables for
|
| 13 |
ENV HOME=/app
|
| 14 |
ENV XDG_CONFIG_HOME=/app/.config
|
| 15 |
ENV XDG_CACHE_HOME=/app/.cache
|
| 16 |
|
| 17 |
-
|
| 18 |
-
RUN mkdir -p /app/.config /app/.cache
|
| 19 |
|
| 20 |
-
# Copy requirements first for caching and install dependencies
|
| 21 |
COPY requirements.txt ./
|
| 22 |
-
|
| 23 |
-
# Install Python dependencies, including watsonx orchestrate
|
| 24 |
RUN pip install --upgrade pip && \
|
| 25 |
pip install --upgrade ibm-watsonx-orchestrate && \
|
| 26 |
pip install -r requirements.txt
|
| 27 |
|
| 28 |
-
# Copy the rest of your app
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
EXPOSE 7860
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
curl \
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Set environment variables for Hugging Face
|
| 12 |
ENV HOME=/app
|
| 13 |
ENV XDG_CONFIG_HOME=/app/.config
|
| 14 |
ENV XDG_CACHE_HOME=/app/.cache
|
| 15 |
|
| 16 |
+
RUN mkdir -p /app/.config /app/.cache/huggingface && chmod -R 777 /app/.cache
|
|
|
|
| 17 |
|
|
|
|
| 18 |
COPY requirements.txt ./
|
|
|
|
|
|
|
| 19 |
RUN pip install --upgrade pip && \
|
| 20 |
pip install --upgrade ibm-watsonx-orchestrate && \
|
| 21 |
pip install -r requirements.txt
|
| 22 |
|
|
|
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
EXPOSE 7860
|