#!/bin/bash/python3


import os
import time
import shutil

from bestpix import PhotosInterface

os.system('clear')
time.sleep(1)

pi = PhotosInterface()
pi.find_photos()

# Remove the docker container if there is one
os.system('cleanup')

# Start new container
command_to_start = f"docker run --rm -it -p 127.0.0.1:8442:8442 --volume {pi.temp_folder}:/opt/bestpix_data --name bestpix bluehalswater/bestpix"

print('Running command:')
print(f'    {command_to_start}')
print()
os.system(command_to_start)