Soumik555 commited on
Commit
be86181
·
1 Parent(s): ec0e22d

removed trailing from post

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -0
  2. controller.py +3 -0
Dockerfile CHANGED
@@ -7,6 +7,9 @@ WORKDIR /app
7
  # Create the cache directory and set permissions
8
  RUN mkdir -p /app/cache && chmod -R 777 /app/cache
9
 
 
 
 
10
  # Copy the requirements file first
11
  COPY requirements.txt .
12
 
 
7
  # Create the cache directory and set permissions
8
  RUN mkdir -p /app/cache && chmod -R 777 /app/cache
9
 
10
+ # Create the log file and set permissions
11
+ RUN touch /app/pandasai.log && chmod 666 /app/pandasai.log
12
+
13
  # Copy the requirements file first
14
  COPY requirements.txt .
15
 
controller.py CHANGED
@@ -36,6 +36,9 @@ app = FastAPI()
36
  # Ensure the cache directory exists
37
  os.makedirs("/app/cache", exist_ok=True)
38
 
 
 
 
39
  load_dotenv()
40
 
41
  image_file_path = os.getenv("IMAGE_FILE_PATH")
 
36
  # Ensure the cache directory exists
37
  os.makedirs("/app/cache", exist_ok=True)
38
 
39
+ os.makedirs("/app", exist_ok=True)
40
+ open("/app/pandasai.log", "a").close() # Create the file if it doesn't exist
41
+
42
  load_dotenv()
43
 
44
  image_file_path = os.getenv("IMAGE_FILE_PATH")