| |
| FROM ubuntu:20.04 |
|
|
| |
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| python3.9 \ |
| python3.9-dev \ |
| python3.9-distutils \ |
| python3-pip \ |
| libglib2.0-0 \ |
| libsm6 \ |
| libxext6 \ |
| libxrender1 \ |
| libgomp1 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN ln -s /usr/bin/python3.9 /usr/bin/python |
|
|
| |
| WORKDIR /app |
|
|
| |
| COPY requirements.txt . |
| RUN pip3 install --no-cache-dir --upgrade pip && \ |
| pip3 install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY . . |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "-m", "uvicorn", "inference_server:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|