VikramSingh178 commited on
Commit
44df8cb
1 Parent(s): 76afedf

chore: Update Dockerfile and requirements.txt

Browse files

Former-commit-id: a0fda043c94c51694d1df63203c42cd04c771699
Former-commit-id: 8bcee671ed4e2b1bbcaeaf2cd5bda63e47430851

Files changed (2) hide show
  1. Dockerfile +3 -1
  2. api/routers/sdxl_text_to_image.py +2 -2
Dockerfile CHANGED
@@ -21,6 +21,8 @@ ENV HOME=/home/user \
21
  # Set the final working directory
22
  WORKDIR $HOME/app
23
 
 
 
24
  # Copy the entire project into the container, setting the appropriate ownership
25
  COPY --chown=user . $HOME/app
26
 
@@ -28,4 +30,4 @@ COPY --chown=user . $HOME/app
28
  WORKDIR $HOME/app/api
29
 
30
  # Command to run the API
31
- CMD ["python", "endpoints.py"]
 
21
  # Set the final working directory
22
  WORKDIR $HOME/app
23
 
24
+
25
+
26
  # Copy the entire project into the container, setting the appropriate ownership
27
  COPY --chown=user . $HOME/app
28
 
 
30
  WORKDIR $HOME/app/api
31
 
32
  # Command to run the API
33
+ CMD ["python", "endpoints.py"]
api/routers/sdxl_text_to_image.py CHANGED
@@ -1,5 +1,5 @@
1
  import sys
2
- sys.path.append("../../scripts") # Path of the scripts directory
3
  import config
4
  from fastapi import APIRouter, HTTPException
5
  from pydantic import BaseModel
@@ -12,7 +12,7 @@ import torch
12
  from functools import lru_cache
13
  from PIL import Image
14
  import io
15
- from utils import accelerator
16
  from models.sdxl_input import InputFormat
17
  from async_batcher.batcher import AsyncBatcher
18
  from utils import pil_to_b64_json, pil_to_s3_json
 
1
  import sys
2
+ sys.path.append("../scripts") # Path of the scripts directory
3
  import config
4
  from fastapi import APIRouter, HTTPException
5
  from pydantic import BaseModel
 
12
  from functools import lru_cache
13
  from PIL import Image
14
  import io
15
+ from scripts.utils import accelerator
16
  from models.sdxl_input import InputFormat
17
  from async_batcher.batcher import AsyncBatcher
18
  from utils import pil_to_b64_json, pil_to_s3_json