/
githubmirror
/
models
Обзор
Документация
Войти
/
githubmirror
/
models
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
research/object_detection/dockerfiles/tf2_ai_platform/Dockerfile
50 строк
2 KB
bhandarivijay
chore: Migrate gsutil usage to gcloud storage
03 мар 2026, 20:50
03 мар 2026, 20:50
4619290
Код
Авторство
О чём код?
FROM tensorflow/tensorflow:latest-gpu ARG DEBIAN_FRONTEND=noninteractive # Install apt dependencies RUN apt-get update && apt-get install -y \ git \ gpg-agent \ python3-cairocffi \ protobuf-compiler \ python3-pil \ python3-lxml \ python3-tk \ python3-opencv \ wget # Installs google cloud sdk, this is mostly for using gcloud storage to export model. RUN wget -nv \ https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz && \ mkdir /root/tools && \ tar xvzf google-cloud-sdk.tar.gz -C /root/tools && \ rm google-cloud-sdk.tar.gz && \ /root/tools/google-cloud-sdk/install.sh --usage-reporting=false \ --path-update=false --bash-completion=false \ --disable-installation-options && \ rm -rf /root/.config/* && \ ln -s /root/.config /config && \ rm -rf /root/tools/google-cloud-sdk/.install/.backup # Path configuration ENV PATH $PATH:/root/tools/google-cloud-sdk/bin # Make sure gcloud storage will use the default service account RUN echo '[GoogleCompute]\nservice_account = default' > /etc/boto.cfg WORKDIR /home/tensorflow ## Copy this code (make sure you are under the ../models/research directory) COPY . /home/tensorflow/models # Compile protobuf configs RUN (cd /home/tensorflow/models/ && protoc object_detection/protos/*.proto --python_out=.) WORKDIR /home/tensorflow/models/ RUN cp object_detection/packages/tf2/setup.py ./ ENV PATH="/home/tensorflow/.local/bin:${PATH}" RUN python -m pip install -U pip RUN python -m pip install . ENTRYPOINT ["python", "object_detection/model_main_tf2.py"]