重写独立dockerfile
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
FROM continuumio/miniconda3:latest AS pythonocc
|
||||
|
||||
RUN conda update -n base -c defaults conda -y && \
|
||||
conda create -n moldinsight python=3.11 pythonocc-core=7.9.0 -c conda-forge -y
|
||||
|
||||
FROM gemold-base:latest
|
||||
|
||||
COPY --from=pythonocc /opt/conda/envs/moldinsight/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
|
||||
|
||||
COPY deploy/requirements-moldinsight.txt .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements-moldinsight.txt && \
|
||||
rm requirements-moldinsight.txt
|
||||
|
||||
COPY src/moldinsight/ /app/src/moldinsight/
|
||||
COPY src/inventory/ /app/src/inventory/
|
||||
COPY src/entrypoints/ /app/src/entrypoints/
|
||||
COPY src/celery_app.py src/celery_tasks.py /app/src/
|
||||
COPY uploads/ /app/uploads/
|
||||
COPY static/ /app/static/
|
||||
COPY html_output/ /app/html_output/
|
||||
|
||||
RUN mkdir -p /app/logs
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=60s \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
|
||||
|
||||
CMD ["python", "-m", "uvicorn", "entrypoints.moldinsight:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user