1- # base stage target - common dependencies
2- FROM python:3.10-slim as base
3-
4- # Set a common work directory
5- WORKDIR /usr/src/app
6-
7- # Installing dependencies
8-
9- # Copy application code
10- COPY celery_app /usr/src/app/celery_app
11- COPY http_server /usr/src/app/http_server
12- COPY document /usr/src/app/document
13- COPY docker-entrypoint.sh wait-for-it.sh healthcheck.sh ./
14- COPY simple/diarization /usr/src/app/diarization
15- COPY simple/requirements.txt /usr/src/app/
16- COPY simple/RELEASE.md ./
17-
18- # ###########################################################################################################
19-
20- # Here we might build a specific image for the CPU target, use different dependencies, entrypoints, etc.
21- # using : FROM base as cpu
22- # not relevant for this dockerfile
23-
24- # ###########################################################################################################
25-
26- # gpu stage target - python app with nvidia/cuda base image
27- FROM nvidia/cuda:12.3.2-base-ubuntu22.04 as gpu
1+ FROM python:3.10
282293
304# Re-Sets work directory (not sure if this is necessary)
@@ -37,13 +11,23 @@ RUN apt-get update && \
3711 rm -rf /var/lib/apt/lists/* && \
3812 ln -s /usr/bin/python3.10 /usr/bin/python
3913
14+ # # Set a common work directory
15+ WORKDIR /usr/src/app
16+
4017# Install python packages
4118# Reuse labels and base dependencies from the base stage
42- COPY --from=base /usr/src/app /requirements.txt /usr/src/app/requirements.txt
43- RUN pip install --no-cache-dir -r requirements.txt
19+ COPY simple /requirements.txt /usr/src/app/requirements.txt
20+ RUN pip install --upgrade pip && pip install -- no-cache-dir -r requirements.txt
4421
45- # Reuse labels and base dependencies from the base stage
46- COPY --from=base /usr/src/app /usr/src/app
22+
23+ # Copy application code
24+ COPY celery_app /usr/src/app/celery_app
25+ COPY http_server /usr/src/app/http_server
26+ COPY document /usr/src/app/document
27+ COPY docker-entrypoint.sh wait-for-it.sh healthcheck.sh ./
28+ COPY simple/diarization /usr/src/app/diarization
29+ COPY simple/requirements.txt /usr/src/app/
30+ COPY simple/RELEASE.md ./
4731
4832# Set path
4933ENV PYTHONPATH="${PYTHONPATH}:/usr/src/app/diarization"
0 commit comments