Spaces:
Sleeping
Sleeping
Download Dockerfile from Lulc-Recognition/AMSI-Net: direct link, hf CLI and curl.
- Browser
- Download file 640 Bytes
-
https://huggingface.co/spaces/Lulc-Recognition/AMSI-Net/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Lulc-Recognition/AMSI-Net/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Lulc-Recognition/AMSI-Net/resolve/main/Dockerfile
640 Bytes
| # Use official Python image | |
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies for OpenCV and other libraries | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy source code and models | |
| COPY backend/ ./backend/ | |
| COPY model/ ./model/ | |
| # Set Python path to include backend directory | |
| ENV PYTHONPATH="/app/backend:${PYTHONPATH}" | |
| # Expose port (HF Spaces use 7860) | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "backend/app.py"] | |