Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| WORKDIR /app | |
| ENV HF_HOME=/tmp/huggingface | |
| ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers | |
| ENV HF_DATASETS_CACHE=/tmp/huggingface/datasets | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV CUDA_VISIBLE_DEVICES="" | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| cmake \ | |
| libopenblas-dev \ | |
| liblapack-dev \ | |
| git \ | |
| libopencv-dev \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN mkdir -p /tmp/uploads /tmp/results /tmp/huggingface/transformers /tmp/huggingface/datasets \ | |
| && chmod -R 777 /tmp/uploads /tmp/results /tmp/huggingface | |
| # Copy requirements file and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -U pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |