Update Dockerfile
Browse files- Dockerfile +14 -2
Dockerfile
CHANGED
|
@@ -4,11 +4,15 @@ FROM python:3.10-slim
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies for git and other
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
| 10 |
build-essential \
|
| 11 |
libpq-dev \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# Clone the repository
|
|
@@ -17,8 +21,16 @@ RUN git clone https://github.com/rupeshs/fastsdcpu.git .
|
|
| 17 |
# Create a virtual environment
|
| 18 |
RUN python -m venv env
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
# Activate virtual environment and install Python dependencies
|
| 21 |
-
RUN . env/bin/activate && pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
# Ensure the start-webserver.sh script is executable
|
| 24 |
RUN chmod +x start-webserver.sh
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies for git, OpenCV, OpenVINO, and other requirements
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
| 10 |
build-essential \
|
| 11 |
libpq-dev \
|
| 12 |
+
libgl1 \
|
| 13 |
+
libopencv-dev \
|
| 14 |
+
libblas-dev \
|
| 15 |
+
liblapack-dev \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
# Clone the repository
|
|
|
|
| 21 |
# Create a virtual environment
|
| 22 |
RUN python -m venv env
|
| 23 |
|
| 24 |
+
# Set environment variables for Hugging Face cache and OpenVINO telemetry
|
| 25 |
+
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface \
|
| 26 |
+
HF_HOME=/app/.cache/huggingface \
|
| 27 |
+
OPENVINO_TELEMETRY_DIR=/app/telemetry
|
| 28 |
+
|
| 29 |
+
# Create cache and telemetry directories
|
| 30 |
+
RUN mkdir -p /app/.cache/huggingface /app/telemetry && chmod -R 777 /app/.cache /app/telemetry
|
| 31 |
+
|
| 32 |
# Activate virtual environment and install Python dependencies
|
| 33 |
+
#RUN . env/bin/activate && pip install --no-cache-dir -r requirements.txt
|
| 34 |
|
| 35 |
# Ensure the start-webserver.sh script is executable
|
| 36 |
RUN chmod +x start-webserver.sh
|