Spaces:
Runtime error
Runtime error
Download Dockerfile from Vedant2421/machinefaultdiagnosis: direct link, hf CLI and curl.
- Browser
- Download file 900 Bytes
-
https://huggingface.co/spaces/Vedant2421/machinefaultdiagnosis/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Vedant2421/machinefaultdiagnosis/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Vedant2421/machinefaultdiagnosis/resolve/main/Dockerfile
900 Bytes
| # Stable Python version compatible with ML libraries | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Prevent Python from writing pyc files & enable logs | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install system dependencies (important for numpy, tensorflow, opencv, etc.) | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip (important for tensorflow installs) | |
| RUN pip install --no-cache-dir --upgrade pip | |
| # Copy only requirements first (better caching) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY src/ ./src/ | |
| # Expose Streamlit default port | |
| EXPOSE 8501 | |
| # Run Streamlit app | |
| CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"] |