|
|
|
FROM python:3.10-slim |
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 |
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y procps wget && apt-get clean |
|
|
|
|
|
RUN wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/requirements.txt |
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/main.py |
|
|
|
|
|
RUN mkdir api && cd api && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/app.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/auth.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/config.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/logger.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/utils.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/models.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/routes.py && \ |
|
wget https://huggingface.co/datasets/SuperAPIs/Data/resolve/main/api/validate.py |
|
|
|
|
|
EXPOSE 8001 |
|
|
|
|
|
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 8001 --workers $(nproc)"] |