Download Dockerfile from oopshnik/api: direct link, hf CLI and curl.
- Browser
- Download file 829 Bytes
-
https://huggingface.co/spaces/oopshnik/api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/oopshnik/api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/oopshnik/api/resolve/main/Dockerfile
829 Bytes
| # Use official Python image | |
| FROM python:3.11-slim | |
| # Set work directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libglib2.0-0 \ | |
| libnss3 \ | |
| libfontconfig1 \ | |
| libxss1 \ | |
| libasound2 \ | |
| libatk1.0-0 \ | |
| libatk-bridge2.0-0 \ | |
| libcups2 \ | |
| libdrm2 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxrandr2 \ | |
| libgbm1 \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy project files | |
| COPY . /app | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir . && \ | |
| pip install --no-cache-dir fastapi uvicorn[standard] patchright markdownify beautifulsoup4 readability-lxml ddgs | |
| # Expose port | |
| EXPOSE 8000 | |
| # Run the FastAPI server | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] | |