diff --git a/.gitignore b/.gitignore index afde035..5db784e 100644 --- a/.gitignore +++ b/.gitignore @@ -84,4 +84,7 @@ target/ # makefile step sync_collections resize_collections -build_tfrecords \ No newline at end of file +build_tfrecords + +# mysql dir +mysql/ \ No newline at end of file diff --git a/Makefile b/Makefile index 2d9fb48..fadd0be 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ BUCKET = [OPTIONAL] your-bucket-for-syncing-data (do not include 's3://') PROFILE = default PROJECT_NAME = smartissposts PYTHON_INTERPRETER = python +SH_INTERPRETER = /bin/sh ifeq (,$(shell which conda)) HAS_CONDA=False @@ -30,9 +31,8 @@ data: requirements $(PYTHON_INTERPRETER) src/data/make_dataset.py ## Sync photos with my refs -sync_collections: src/data/sync_collections.py - $(PYTHON_INTERPRETER) src/data/sync_collections.py - touch sync_collections +sync_collections: iss/data/sync_collections.sh + $(PYTHON_INTERPRETER) iss/data/sync_collections.sh ## Resize collection resize_collections: src/data/resize_collections.py @@ -55,8 +55,8 @@ draft: ## Delete all compiled Python files clean: - find . -type f -name "*.py[co]" -delete - find . -type d -name "__pycache__" -delete + find . -path ./mysql -prune -o -type f -name "*.py[co]" -exec rm {} + + find . -path ./mysql -prune -o -type d -name "__pycache__" -exec rm {} + ## Lint using flake8 lint: diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..7718369 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,48 @@ +version: "3" +services: + jupyter: + image: jupyter/tensorflow-notebook:7f1482f5a136 + container_name: jupyter-iss + command: start.sh jupyter lab --NotebookApp.base_url=/jupyter --NotebookApp.token='' --NotebookApp.password='' + networks: + - netproxy + - default + volumes: + - "${PWD}:/home/jovyan/work" + labels: + - "traefik.enable=true" + - "traefik.frontend.rule=Host:iss.docker.lo;PathPrefix: /jupyter" + - "traefik.port=8888" + + adminer: + image: adminer:4.7 + container_name: adminer-iss + networks: + - netproxy + - default + labels: + - "traefik.enable=true" + - "traefik.frontend.rule=Host:iss.docker.lo;PathPrefix: /adminer" + - "traefik.port=8080" + - "traefik.main.frontend.entryPoints=http" + + mysql: + image: mysql:8 + container_name: mysql-iss + networks: + - default + volumes: + - "${PWD}/mysql:/var/lib/mysql" + environment: + MYSQL_DATABASE: iss + MYSQL_ROOT_PASSWORD: pass + MYSQL_USER: iss + MYSQL_PASSWORD: iss + labels: + - "traefik.enable=false" + + +networks: + netproxy: + external: + name: netproxy diff --git a/setup.py b/setup.py index 872d16c..c6f86f1 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages, setup setup( - name='src', + name='iss', packages=find_packages(), version='0.1.0', description='Project to identify nice pics from live ISS',