diff --git a/README.md b/README.md index b6ed264..b304f85 100644 --- a/README.md +++ b/README.md @@ -33,16 +33,34 @@ CMOS simulation tools, that are required: ### Installing A step by step series of examples that tell you how to get a development env running. -All the installation steps are being handled by the [requirements](requirements.txt). You can use venv by typing: +All the installation steps are being handled by the appropriate docker-compose file: + +#### PyTorch + +Start the container: + +``` +$ docker compose -f docker/docker-compose-pytorch.yaml up -d +``` + +Enter the container: + +``` +$ docker exec -it cmos-preprocessor-pytorch bash +``` + +#### Tensorflow + +Start the container: ``` -$ python -m venv venv +$ docker compose -f docker/docker-compose-tensorflow.yaml up -d ``` -Activate venv and install requierments. +Enter the container: ``` -$ pip install -r requirements.txt +$ docker exec -it cmos-preprocessor-tensorflow bash ``` ## Running the code diff --git a/docker/DockerfilePyTorch b/docker/DockerfilePyTorch new file mode 100644 index 0000000..e919253 --- /dev/null +++ b/docker/DockerfilePyTorch @@ -0,0 +1,6 @@ +FROM pytorch/pytorch:2.4.0-cuda11.8-cudnn9-runtime +WORKDIR /cmos-preprocessor +RUN apt-get update +COPY requirements-pytorch.txt requirements-pytorch.txt +RUN pip install -r requirements-pytorch.txt +ENTRYPOINT [ "/bin/bash" ] \ No newline at end of file diff --git a/docker/DockerfileTensorflow b/docker/DockerfileTensorflow new file mode 100644 index 0000000..8c745cd --- /dev/null +++ b/docker/DockerfileTensorflow @@ -0,0 +1,6 @@ +FROM tensorflow/tensorflow:2.13.0-gpu +WORKDIR /cmos-preprocessor +RUN apt-get update +COPY requirements-tensorflow.txt requirements-tensorflow.txt +RUN pip install -r requirements-tensorflow.txt +ENTRYPOINT [ "/bin/bash" ] \ No newline at end of file diff --git a/docker/docker-compose-pytorch.yaml b/docker/docker-compose-pytorch.yaml new file mode 100644 index 0000000..e031d04 --- /dev/null +++ b/docker/docker-compose-pytorch.yaml @@ -0,0 +1,20 @@ +version: "1.0" +services: + cmos-preprocessor-pytorch: + container_name: cmos-preprocessor-pytorch + environment: + - PYTHONPATH=/cmos-preprocessor/ + build: + dockerfile: DockerfilePyTorch + volumes: + - ../:/cmos-preprocessor + tty: true + stdin_open: true + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + entrypoint: /bin/bash \ No newline at end of file diff --git a/docker/docker-compose-tensorflow.yaml b/docker/docker-compose-tensorflow.yaml new file mode 100644 index 0000000..f7b75ea --- /dev/null +++ b/docker/docker-compose-tensorflow.yaml @@ -0,0 +1,20 @@ +version: "1.0" +services: + cmos-preprocessor-tensorflow: + container_name: cmos-preprocessor-tensorflow + environment: + - PYTHONPATH=/cmos-preprocessor/ + build: + dockerfile: DockerfileTensorflow + volumes: + - ../:/cmos-preprocessor + tty: true + stdin_open: true + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + entrypoint: /bin/bash \ No newline at end of file diff --git a/requirements-pytorch.txt b/requirements-pytorch.txt new file mode 100644 index 0000000..d1b19d5 --- /dev/null +++ b/requirements-pytorch.txt @@ -0,0 +1,105 @@ +anaconda-anon-usage @ file:///croot/anaconda-anon-usage_1710965072196/work +archspec @ file:///croot/archspec_1709217642129/work +asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work +astunparse==1.6.3 +attrs @ file:///croot/attrs_1695717823297/work +beautifulsoup4 @ file:///croot/beautifulsoup4-split_1718029820055/work +boltons @ file:///work/ci_py311/boltons_1677685195580/work +Brotli @ file:///croot/brotli-split_1714483155106/work +certifi @ file:///croot/certifi_1720453481653/work/certifi +cffi @ file:///croot/cffi_1714483155441/work +chardet @ file:///work/ci_py311/chardet_1676830276092/work +charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work +click @ file:///croot/click_1698129812380/work +conda @ file:///croot/conda_1715635703388/work +conda-build @ file:///croot/conda-build_1716991285767/work +conda-content-trust @ file:///croot/conda-content-trust_1714483159009/work +conda-libmamba-solver @ file:///croot/conda-libmamba-solver_1706733287605/work/src +conda-package-handling @ file:///croot/conda-package-handling_1718138267740/work +conda_index @ file:///croot/conda-index_1719338209492/work +conda_package_streaming @ file:///croot/conda-package-streaming_1718136078615/work +contourpy==1.3.0 +cryptography @ file:///croot/cryptography_1714660666131/work +cycler==0.12.1 +decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work +distro @ file:///croot/distro_1714488253808/work +dnspython==2.6.1 +executing @ file:///opt/conda/conda-bld/executing_1646925071911/work +expecttest==0.2.1 +filelock @ file:///croot/filelock_1700591183607/work +fonttools==4.53.1 +frozendict @ file:///croot/frozendict_1713194832637/work +fsspec==2024.6.1 +gmpy2 @ file:///work/ci_py311/gmpy2_1676839849213/work +hypothesis==6.108.4 +idna @ file:///croot/idna_1714398848350/work +ipython @ file:///croot/ipython_1718287989724/work +jedi @ file:///croot/jedi_1721058342488/work +Jinja2 @ file:///croot/jinja2_1716993405101/work +joblib==1.4.2 +jsonpatch @ file:///croot/jsonpatch_1714483231291/work +jsonpointer==2.1 +jsonschema @ file:///croot/jsonschema_1699041609003/work +jsonschema-specifications @ file:///croot/jsonschema-specifications_1699032386549/work +kiwisolver==1.4.5 +libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work +libmambapy @ file:///croot/mamba-split_1714483352891/work/libmambapy +lintrunner==0.12.5 +MarkupSafe @ file:///croot/markupsafe_1704205993651/work +matplotlib==3.7.5 +matplotlib-inline @ file:///work/ci_py311/matplotlib-inline_1676823841154/work +menuinst @ file:///croot/menuinst_1718132535249/work +mkl-fft @ file:///croot/mkl_fft_1695058164594/work +mkl-random @ file:///croot/mkl_random_1695059800811/work +mkl-service==2.4.0 +more-itertools @ file:///croot/more-itertools_1700662129964/work +mpmath @ file:///croot/mpmath_1690848262763/work +networkx @ file:///croot/networkx_1720002482208/work +ninja==1.11.1.1 +numpy @ file:///croot/numpy_and_numpy_base_1708638617955/work/dist/numpy-1.26.4-cp311-cp311-linux_x86_64.whl#sha256=5f96f274d410a1682519282ae769c877d32fdbf171aa8badec7bf5e1d3a1748a +optree==0.12.1 +packaging @ file:///croot/packaging_1720101850331/work +parso @ file:///opt/conda/conda-bld/parso_1641458642106/work +pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work +pillow @ file:///croot/pillow_1721059439630/work +pkginfo @ file:///croot/pkginfo_1715695984887/work +platformdirs @ file:///croot/platformdirs_1692205439124/work +pluggy @ file:///work/ci_py311/pluggy_1676822818071/work +prompt-toolkit @ file:///croot/prompt-toolkit_1704404351921/work +psutil @ file:///work/ci_py311_2/psutil_1679337388738/work +ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl +pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work +pycosat @ file:///croot/pycosat_1714510623388/work +pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work +Pygments @ file:///croot/pygments_1684279966437/work +pyparsing==3.1.4 +PySocks @ file:///work/ci_py311/pysocks_1676822712504/work +python-dateutil==2.9.0.post0 +python-etcd==0.4.5 +pytz @ file:///croot/pytz_1713974312559/work +PyYAML @ file:///croot/pyyaml_1698096049011/work +referencing @ file:///croot/referencing_1699012038513/work +requests @ file:///croot/requests_1721410876868/work +rpds-py @ file:///croot/rpds-py_1698945930462/work +ruamel.yaml @ file:///work/ci_py311/ruamel.yaml_1676838772170/work +scikit-learn==1.3.2 +scipy==1.14.1 +six @ file:///tmp/build/80754af9/six_1644875935023/work +sortedcontainers==2.4.0 +soupsieve @ file:///croot/soupsieve_1696347547217/work +stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work +sympy @ file:///croot/sympy_1701397643339/work +threadpoolctl==3.5.0 +torch==2.4.0 +torchaudio==2.4.0 +torchelastic==0.2.2 +torchvision==0.19.0 +tqdm @ file:///croot/tqdm_1716395931952/work +traitlets @ file:///croot/traitlets_1718227057033/work +triton==3.0.0 +truststore @ file:///croot/truststore_1695244293384/work +types-dataclasses==0.6.6 +typing_extensions @ file:///croot/typing_extensions_1715268824938/work +urllib3 @ file:///croot/urllib3_1718912636303/work +wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work +zstandard @ file:///croot/zstandard_1714677652653/work diff --git a/requirements-tensorflow.txt b/requirements-tensorflow.txt new file mode 100644 index 0000000..2c00396 --- /dev/null +++ b/requirements-tensorflow.txt @@ -0,0 +1,57 @@ +absl-py==1.4.0 +astunparse==1.6.3 +cachetools==5.3.1 +certifi==2019.11.28 +chardet==3.0.4 +contourpy==1.1.1 +cycler==0.12.1 +dbus-python==1.2.16 +flatbuffers==23.5.26 +fonttools==4.53.1 +gast==0.4.0 +google-auth==2.21.0 +google-auth-oauthlib==1.0.0 +google-pasta==0.2.0 +grpcio==1.56.0 +h5py==3.9.0 +idna==2.8 +importlib-metadata==6.7.0 +importlib_resources==6.4.4 +joblib==1.4.2 +keras==2.13.1 +kiwisolver==1.4.5 +libclang==16.0.0 +Markdown==3.4.3 +MarkupSafe==2.1.3 +matplotlib==3.7.5 +numpy==1.24.3 +oauthlib==3.2.2 +opt-einsum==3.3.0 +packaging==23.1 +pillow==10.4.0 +protobuf==4.23.3 +pyasn1==0.5.0 +pyasn1-modules==0.3.0 +PyGObject==3.36.0 +pyparsing==3.1.4 +python-apt==2.0.1+ubuntu0.20.4.1 +python-dateutil==2.9.0.post0 +requests==2.22.0 +requests-oauthlib==1.3.1 +requests-unixsocket==0.2.0 +rsa==4.9 +scikit-learn==1.3.2 +scipy==1.10.1 +six==1.14.0 +tensorboard==2.13.0 +tensorboard-data-server==0.7.1 +tensorflow==2.13.0 +tensorflow-estimator==2.13.0 +tensorflow-io-gcs-filesystem==0.32.0 +termcolor==2.3.0 +threadpoolctl==3.5.0 +typing_extensions==4.5.0 +urllib3==1.25.8 +Werkzeug==2.3.6 +wrapt==1.15.0 +zipp==3.15.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e69de29..0000000