Thomas (Tom) Gardos commited on
Commit
54b0d0c
2 Parent(s): dacf8f2 5366248

Merge pull request #33 from DL4DS/docker_fix

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -10,7 +10,8 @@ RUN pip install --no-cache-dir -r /code/requirements.txt
10
 
11
  COPY . /code
12
 
13
- RUN ls -R
 
14
 
15
  # Change permissions to allow writing to the directory
16
  RUN chmod -R 777 /code
@@ -21,7 +22,10 @@ RUN mkdir /code/logs && chmod 777 /code/logs
21
  # Create a cache directory within the application's working directory
22
  RUN mkdir /.cache && chmod -R 777 /.cache
23
 
 
 
24
  RUN --mount=type=secret,id=HUGGINGFACEHUB_API_TOKEN,mode=0444,required=true
25
  RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
26
 
27
- CMD python code/modules/vector_db.py && chainlit run code/main.py --host 0.0.0.0 --port 7860
 
 
10
 
11
  COPY . /code
12
 
13
+ # List the contents of the /code directory to verify files are copied correctly
14
+ RUN ls -R /code
15
 
16
  # Change permissions to allow writing to the directory
17
  RUN chmod -R 777 /code
 
22
  # Create a cache directory within the application's working directory
23
  RUN mkdir /.cache && chmod -R 777 /.cache
24
 
25
+ WORKDIR /code/code
26
+
27
  RUN --mount=type=secret,id=HUGGINGFACEHUB_API_TOKEN,mode=0444,required=true
28
  RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
29
 
30
+ # Default command to run the application
31
+ CMD ["sh", "-c", "python -m modules.vectorstore.store_manager && chainlit run main.py --host 0.0.0.0 --port 7860"]