Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -2,12 +2,17 @@ FROM python:3.12
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 curl \
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/* \
|
| 9 |
&& git lfs install
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Install Node.js (required for gradio)
|
| 12 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
| 13 |
&& apt-get install -y nodejs \
|
|
@@ -17,7 +22,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
| 17 |
RUN pip install --no-cache-dir pip -U \
|
| 18 |
&& pip install --no-cache-dir datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1"
|
| 19 |
|
| 20 |
-
# Copy and install
|
| 21 |
COPY requirements.txt /tmp/requirements.txt
|
| 22 |
RUN pip install --no-cache-dir -r /tmp/requirements.txt \
|
| 23 |
"gradio>=3.50,<4.0" \
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies including Rust
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 curl \
|
| 8 |
+
build-essential pkg-config \
|
| 9 |
&& rm -rf /var/lib/apt/lists/* \
|
| 10 |
&& git lfs install
|
| 11 |
|
| 12 |
+
# Install Rust compiler (required for building tokenizers)
|
| 13 |
+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
| 14 |
+
ENV PATH="/root/.cargo/bin:${PATH}"
|
| 15 |
+
|
| 16 |
# Install Node.js (required for gradio)
|
| 17 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
| 18 |
&& apt-get install -y nodejs \
|
|
|
|
| 22 |
RUN pip install --no-cache-dir pip -U \
|
| 23 |
&& pip install --no-cache-dir datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1"
|
| 24 |
|
| 25 |
+
# Copy requirements and install with gradio 3.x (compatible with transformers)
|
| 26 |
COPY requirements.txt /tmp/requirements.txt
|
| 27 |
RUN pip install --no-cache-dir -r /tmp/requirements.txt \
|
| 28 |
"gradio>=3.50,<4.0" \
|