Tom Beckenhauer 2021-09-28 18:06:15 +05:30 zatwierdzone przez GitHub
commit 90d302d484
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 33 dodań i 0 usunięć

16
Dockerfile 100644
Wyświetl plik

@ -0,0 +1,16 @@
FROM python:3.7-slim
ENV PATH="~/.local/bin:${PATH}"
ENV PATH="/home/testuser/.local/bin:${PATH}"
#Mirror host user
#Efficently mirror host user and share files between host and docker
#https://stackoverflow.com/a/44683248/298240
ARG UNAME=testuser
ARG UID=1000
ARG GID=1000
#FIXES https://stackoverflow.com/a/63377623/298240
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 python3-opencv sudo && groupadd -g $GID -o $UNAME && useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME && echo "testuser:testuser" | chpasswd && adduser testuser sudo
USER $UNAME
WORKDIR /home/$UNAME/workspace
RUN pip install --upgrade h5py==2.10.0 fawkes opencv-python

Wyświetl plik

@ -62,6 +62,16 @@ pip install fawkes
If you don't have root privilege, please try to install on user namespace: `pip install --user fawkes`.
## Installation and Usage with Docker
- On your host machine move or copy your images folder to your normal workspace directory `cd ~/workspace`
- clone this repository: `git clone [url]` into your normal workspace directory
- go into cloned repository: `cd fawkes`
- run `buildDocker.sh`
- run `startDocker.sh`
- You should now be in the fawkes container with your normal workspace directory to /home/testuser/workspace
- You can then run fawkes with something like: e.g. `fawkes -d ./imgs --mode=low`
- exit from your container: `exit`
Academic Research Usage
-----------------------

5
buildDocker.sh 100755
Wyświetl plik

@ -0,0 +1,5 @@
#Pass in user id's for mirroring host user
docker build \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
-t fawkes .

2
startDocker.sh 100755
Wyświetl plik

@ -0,0 +1,2 @@
#Map Parrent directory to workspace folder under home directory
docker run -it -v "$(pwd)/..:/home/testuser/workspace" fawkes bash