File size: 1,296 Bytes
15edb30 5c0f98c e425382 f38e497 e425382 f38e497 1b3b60b 15edb30 5c0f98c f38e497 e425382 cb70ef6 e425382 f484a01 e425382 f38e497 a2a7196 1b3b60b 15edb30 1b3b60b f38e497 db7ae87 5c0f98c 15edb30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# Use an official Python runtime as the base image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies for git, OpenCV, OpenVINO, and other requirements
RUN apt-get update && apt-get install -y \
git \
build-essential \
libpq-dev \
libgl1 \
libopencv-dev \
libblas-dev \
liblapack-dev \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository
RUN git clone https://github.com/rupeshs/fastsdcpu.git .
# Create a virtual environment
RUN python -m venv env
# Set environment variables for Hugging Face cache and OpenVINO telemetry
ENV HF_HOME=/app/.cache/huggingface \
OPENVINO_TELEMETRY_DIR=/app/telemetry
# Create cache, telemetry, configs, and results directories with write permissions
RUN mkdir -p /app/.cache/huggingface /app/telemetry /app/configs /app/results && \
chmod -R 777 /app/.cache /app/telemetry /app/configs /app/results
# Activate virtual environment and install Python dependencies
RUN . env/bin/activate && pip install --no-cache-dir -r requirements.txt
# Ensure the start-webserver.sh script is executable
RUN chmod +x start-webserver.sh
# Expose port (default to 8000, adjust if the script specifies another port)
#EXPOSE 8000
# Run the start-webserver.sh script
CMD ["./start-webserver.sh"] |