This commit is contained in:
plucky 2018-12-29 00:58:41 +08:00 committed by plucky
commit 486f570e3f
2 changed files with 44 additions and 28 deletions

View file

@ -1,75 +1,88 @@
# For Mac Users # For Mac Users
if you just have a MacBook.deepfacelab gpu mode does not works. however,it can also works with cpu mode. If you just have a **MacBook**.DeepFaceLab **GPU** mode does not works. However,it can also works with **CPU** mode.Follow the Steps below will help you build the **DRE** (DeepFaceLab Runtime Environment) Easier.
### 1. Install Docker ### 1. Open a new terminal and Clone DeepFaceLab with git
```
$ git clone git@github.com:Pluckypan/DeepFaceLab.git
```
### 2. Change the directory to DeepFaceLab
```
$ cd DeepFaceLab
```
### 3. Install Docker
[Docker Desktop for Mac] (https://hub.docker.com/editions/community/docker-ce-desktop-mac) [Docker Desktop for Mac] (https://hub.docker.com/editions/community/docker-ce-desktop-mac)
### 2. Build Docker Image For ### 4. Build Docker Image For DeepFaceLab
``` ```
$ docker build -t deepfacelab-cpu -f Dockerfile.cpu . $ docker build -t deepfacelab-cpu -f Dockerfile.cpu .
``` ```
### 3. Mount deepfacelab volume and Run it ### 5. Mount DeepFaceLab volume and Run it
``` ```
$ docker run -p 8888:8888 --hostname deepfacelab-cpu --name deepfacelab-cpu -v **your source path**:/srv deepfacelab-cpu $ docker run -p 8888:8888 --hostname deepfacelab-cpu --name deepfacelab-cpu -v **your source path**:/notebooks deepfacelab-cpu
# for example # for example
$ docker run -p 8888:8888 --hostname deepfacelab-cpu --name deepfacelab-cpu -v $PWD:/srv deepfacelab-cpu $ docker run -p 8888:8888 --hostname deepfacelab-cpu --name deepfacelab-cpu -v $PWD:/notebooks deepfacelab-cpu
``` ```
then you will see the log: PS: Because your current directory is `DeepFaceLab`,so `-v $PWD:/notebooks` means Mount `DeepFaceLab` volume to `notebooks` in **Docker**
And then you will see the log below:
``` ```
The Jupyter Notebook is running at: The Jupyter Notebook is running at:
http://(deepfacelab-cpu or 127.0.0.1):8888/?token=your token http://(deepfacelab-cpu or 127.0.0.1):8888/?token=your token
``` ```
### 4. Open a new terminal to run deepfacelab in /srv ### 6. Open a new terminal to run DeepFaceLab in /notebooks
``` ```
$ docker exec -it deepfacelab-cpu bash $ docker exec -it deepfacelab-cpu bash
$ cd ../srv/ $ ls -A
``` ```
### 5. Use jupyter in deepfacelab-cpu bash ### 7. Use jupyter in deepfacelab-cpu bash
``` ```
$ jupyter notebook list $ jupyter notebook list
``` ```
or just open it on your browser `http://127.0.0.1:8888/?token=your_token` or just open it on your browser `http://127.0.0.1:8888/?token=your_token`
### 6. Close or Kill Docker Container PS: You can run python with jupyter.However,we just run our code in bash.It's simpler and clearer.Now the **DRE** (DeepFaceLab Runtime Environment) almost builded.
### 8. Stop or Kill Docker Container
``` ```
$ docker stop deepfacelab-cpu
$ docker kill deepfacelab-cpu $ docker kill deepfacelab-cpu
``` ```
### 7. Start Docker Container ### 9. Start Docker Container
``` ```
$ docker start -i deepfacelab-cpu # start docker container
$ docker start deepfacelab-cpu
# open bash to run deepfacelab
$ docker exec -it deepfacelab-cpu bash $ docker exec -it deepfacelab-cpu bash
``` ```
### 8. enjoy it PS: `STEP 8` or `STEP 9` just show you the way to stop and start **DRE**.
### 10. enjoy it
``` ```
$ cd ../srv/ # make sure you current directory is `/notebooks`
$ pwd
# make sure all `DeepFaceLab` code is in current path `/notebooks`
$ ls -a
# read and write permission
$ chmod +x cpu.sh $ chmod +x cpu.sh
# run `DeepFaceLab`
$ ./cpu.sh $ ./cpu.sh
``` ```
#### some error ### Details with `DeepFaceLab`
```
1. localization.py system_locale is NoneType
# system_locale may be nil
system_language = system_locale[0:2] if system_locale is not None else "en"
```
[Install NVIDIA Driver](http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux)
[安装N卡驱动](https://linuxstory.org/how-to-install-latest-nvidia-drivers-in-linux/)

View file

@ -7,7 +7,10 @@ https://github.com/NVIDIA/nvidia-docker
### 8. **IMPORTANT** install cudatoolkit && cudnn ### 8. **IMPORTANT** install cudatoolkit && cudnn
``` ```
$ cd ../srv/
$ chmod +x cuda_9.0_cudnn_7.0_linux.sh $ chmod +x cuda_9.0_cudnn_7.0_linux.sh
$ ./cuda_9.0_cudnn_7.0_linux.sh $ ./cuda_9.0_cudnn_7.0_linux.sh
``` ```
[Install NVIDIA Driver](http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux)
[安装N卡驱动](https://linuxstory.org/how-to-install-latest-nvidia-drivers-in-linux/)