kopia lustrzana https://github.com/Shawn-Shan/fawkes
Merge c8fd67dcbe
into aedaa82d22
commit
90d302d484
|
@ -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
|
10
README.md
10
README.md
|
@ -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
|
||||
-----------------------
|
||||
|
|
|
@ -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 .
|
|
@ -0,0 +1,2 @@
|
|||
#Map Parrent directory to workspace folder under home directory
|
||||
docker run -it -v "$(pwd)/..:/home/testuser/workspace" fawkes bash
|
Ładowanie…
Reference in New Issue