doc: add deploy method via docker
Browse files
    	
        README.md
    CHANGED
    
    | @@ -239,7 +239,7 @@ Available at: https://huggingface.co/gyrojeff/YuzuMarker.FontDetection/tree/main | |
| 239 |  | 
| 240 | 
             
            Note that since I trained everything on pytorch 2.0 with `torch.compile`, if you want to use the pretrained model you would need to install pytorch 2.0 and compile it with `torch.compile` as in `demo.py`.
         | 
| 241 |  | 
| 242 | 
            -
            ## Demo Deployment
         | 
| 243 |  | 
| 244 | 
             
            To deploy the demo, you would need either the whole font dataset under `./dataset/fonts` or a cache file indicating fonts of model called `font_demo_cache.bin`. This will be later released as resource.
         | 
| 245 |  | 
| @@ -273,6 +273,24 @@ optional arguments: | |
| 273 | 
             
                                    Address to use for Gradio (default: 127.0.0.1)
         | 
| 274 | 
             
            ```
         | 
| 275 |  | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 276 | 
             
            ## Online Demo
         | 
| 277 |  | 
| 278 | 
             
            The project is also deployed on Huggingface Space: https://huggingface.co/spaces/gyrojeff/YuzuMarker.FontDetection
         | 
|  | |
| 239 |  | 
| 240 | 
             
            Note that since I trained everything on pytorch 2.0 with `torch.compile`, if you want to use the pretrained model you would need to install pytorch 2.0 and compile it with `torch.compile` as in `demo.py`.
         | 
| 241 |  | 
| 242 | 
            +
            ## Demo Deployment (Method 1)
         | 
| 243 |  | 
| 244 | 
             
            To deploy the demo, you would need either the whole font dataset under `./dataset/fonts` or a cache file indicating fonts of model called `font_demo_cache.bin`. This will be later released as resource.
         | 
| 245 |  | 
|  | |
| 273 | 
             
                                    Address to use for Gradio (default: 127.0.0.1)
         | 
| 274 | 
             
            ```
         | 
| 275 |  | 
| 276 | 
            +
            ## Demo Deployment (Method 2)
         | 
| 277 | 
            +
             | 
| 278 | 
            +
            If docker is available on your machine, you can deploy directly by docker as how I did for huggingface space.
         | 
| 279 | 
            +
             | 
| 280 | 
            +
            You may follow the command line argument provided in the last section to change the last line of the `Dockerfile` to accomodate your needs.
         | 
| 281 | 
            +
             | 
| 282 | 
            +
            Build the docker image:
         | 
| 283 | 
            +
             | 
| 284 | 
            +
            ```bash
         | 
| 285 | 
            +
            docker build -t yuzumarker.fontdetection .
         | 
| 286 | 
            +
            ```
         | 
| 287 | 
            +
             | 
| 288 | 
            +
            Run the docker image:
         | 
| 289 | 
            +
             | 
| 290 | 
            +
            ```bash
         | 
| 291 | 
            +
            docker run -it -p 7860:7860 yuzumarker.fontdetection
         | 
| 292 | 
            +
            ```
         | 
| 293 | 
            +
             | 
| 294 | 
             
            ## Online Demo
         | 
| 295 |  | 
| 296 | 
             
            The project is also deployed on Huggingface Space: https://huggingface.co/spaces/gyrojeff/YuzuMarker.FontDetection
         | 
