-
Notifications
You must be signed in to change notification settings - Fork 0
/
cryptointellect.bat
35 lines (31 loc) · 1.21 KB
/
cryptointellect.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
docker --version > nul && (
break
) || (
echo Please install docker!
exit 1
)
set CONFIG_FILEPATH=%1
set DIR_FILEPATH=%~dp0cryptointellect\
set CSV_FILEPATH=%DIR_FILEPATH%csv\
mkdir %CSV_FILEPATH%
docker rm -f cryptointellect_container
if defined CONFIG_FILEPATH (
if exist %CONFIG_FILEPATH% (
copy %CONFIG_FILEPATH% %DIR_FILEPATH%config.yml
echo # escape=` > %DIR_FILEPATH%/Dockerfile
echo FROM public.ecr.aws/c5m8g6i6/cryptointellect:latest >> %DIR_FILEPATH%/Dockerfile
echo COPY config.yml /src/ >> %DIR_FILEPATH%/Dockerfile
echo RUN python3 src/Initial_startup.py >> %DIR_FILEPATH%/Dockerfile
echo CMD ["cron", "-f"] >> %DIR_FILEPATH%/Dockerfile
cd %DIR_FILEPATH%
docker build . -t cryptointellect
docker run --name cryptointellect_container -d -v %CSV_FILEPATH%:/src/csv_folder/:rw cryptointellect
) else (
echo Config file provided does not exist!
exit 0
)
) else (
docker pull public.ecr.aws/c5m8g6i6/cryptointellect:latest
docker run --name cryptointellect_container -d -v %CSV_FILEPATH%:/src/csv_folder/:rw public.ecr.aws/c5m8g6i6/cryptointellect:latest
)