Farid Karimli commited on
Commit
2bf30a1
·
1 Parent(s): 67db642

Add Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -0
Dockerfile ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ WORKDIR /code
4
+
5
+ RUN pip install --upgrade pip
6
+ RUN pip install --no-cache-dir edubotics_core
7
+ RUN pip install chainlit
8
+ RUN pip install literalai
9
+
10
+ COPY . /code
11
+
12
+ # List the contents of the /code directory to verify files are copied correctly
13
+ RUN ls -R /code
14
+
15
+ # Change permissions to allow writing to the directory
16
+ RUN chmod -R 777 /code
17
+
18
+ # Create a logs directory and set permissions
19
+ RUN mkdir /code/apps/ai_tutor/logs && chmod 777 /code/apps/ai_tutor/logs
20
+
21
+ # Create a cache directory within the application's working directory
22
+ RUN mkdir /.cache && chmod -R 777 /.cache
23
+
24
+ WORKDIR /code/apps/ai_tutor
25
+
26
+ # Expose the port the app runs on
27
+ EXPOSE 7860
28
+
29
+ RUN --mount=type=secret,id=HUGGINGFACEHUB_API_TOKEN,mode=0444,required=true
30
+ RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
31
+ RUN --mount=type=secret,id=CHAINLIT_URL,mode=0444,required=true
32
+ RUN --mount=type=secret,id=LITERAL_API_URL,mode=0444,required=true
33
+ RUN --mount=type=secret,id=LLAMA_CLOUD_API_KEY,mode=0444,required=true
34
+ RUN --mount=type=secret,id=OAUTH_GOOGLE_CLIENT_ID,mode=0444,required=true
35
+ RUN --mount=type=secret,id=OAUTH_GOOGLE_CLIENT_SECRET,mode=0444,required=true
36
+ RUN --mount=type=secret,id=LITERAL_API_KEY_LOGGING,mode=0444,required=true
37
+ RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
38
+
39
+ # Default command to run the application
40
+ CMD vectorstore_creator --config_file config/config.yml --project_config_file config/project_config.yml && python -m uvicorn app:app --host 0.0.0.0 --port 7860