Farid Karimli
commited on
Commit
·
3039dac
1
Parent(s):
dc22334
Dockerfile change
Browse files- Dockerfile +15 -7
Dockerfile
CHANGED
|
@@ -1,19 +1,27 @@
|
|
| 1 |
FROM python:3.11
|
| 2 |
|
| 3 |
-
|
| 4 |
-
RUN chmod -R 777 /apps/ai_tutor
|
| 5 |
-
|
| 6 |
-
WORKDIR /apps/ai_tutor
|
| 7 |
|
| 8 |
RUN pip install --upgrade pip
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Create a logs directory and set permissions
|
| 12 |
-
RUN mkdir logs && chmod 777 logs
|
| 13 |
|
| 14 |
# Create a cache directory within the application's working directory
|
| 15 |
RUN mkdir /.cache && chmod -R 777 /.cache
|
| 16 |
|
|
|
|
|
|
|
| 17 |
# Expose the port the app runs on
|
| 18 |
EXPOSE 7860
|
| 19 |
|
|
@@ -28,4 +36,4 @@ RUN --mount=type=secret,id=LITERAL_API_KEY_LOGGING,mode=0444,required=true
|
|
| 28 |
RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
|
| 29 |
|
| 30 |
# Default command to run the application
|
| 31 |
-
CMD vectorstore_creator --config_file config/config.yml --project_config_file config/project_config.yml && python app
|
|
|
|
| 1 |
FROM python:3.11
|
| 2 |
|
| 3 |
+
WORKDIR /code
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
RUN pip install --upgrade pip
|
| 6 |
+
|
| 7 |
+
RUN pip install --no-cache-dir edubotics_core
|
| 8 |
+
|
| 9 |
+
COPY . /code
|
| 10 |
+
|
| 11 |
+
# List the contents of the /code directory to verify files are copied correctly
|
| 12 |
+
RUN ls -R /code
|
| 13 |
+
|
| 14 |
+
# Change permissions to allow writing to the directory
|
| 15 |
+
RUN chmod -R 777 /code
|
| 16 |
|
| 17 |
# Create a logs directory and set permissions
|
| 18 |
+
RUN mkdir /code/apps/ai_tutor/logs && chmod 777 /code/apps/ai_tutor/logs
|
| 19 |
|
| 20 |
# Create a cache directory within the application's working directory
|
| 21 |
RUN mkdir /.cache && chmod -R 777 /.cache
|
| 22 |
|
| 23 |
+
WORKDIR /code/apps/ai_tutor
|
| 24 |
+
|
| 25 |
# Expose the port the app runs on
|
| 26 |
EXPOSE 7860
|
| 27 |
|
|
|
|
| 36 |
RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
|
| 37 |
|
| 38 |
# Default command to run the application
|
| 39 |
+
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
|