Spaces:
Sleeping
Sleeping
| FROM ubuntu:22.04 | |
| # for GPU: nvidia/cuda:12.0.1-runtime-ubuntu22.04 | |
| RUN mkdir -p /tmp/inputs | |
| RUN mkdir -p /tmp/outputs | |
| RUN mkdir -p /tmp/scratch | |
| RUN apt-get update --fix-missing \ | |
| && apt-get -y --no-install-recommends install \ | |
| python3 \ | |
| python3-pip | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /tmp | |
| ADD requirements.txt /tmp/requirements.txt | |
| RUN /usr/bin/python3 -m pip install --upgrade pip \ | |
| && /usr/bin/python3 -m pip install -r /tmp/requirements.txt | |
| RUN pip install fastapi uvicorn | |
| ADD compute_model_property.py /tmp/compute_model_property.py | |
| #ENTRYPOINT ["python3", "/tmp/compute_model_property.py"] | |
| CMD ["uvicorn", "compute_model_property:app", "--host", "0.0.0.0", "--port", "7860"] |