Spaces:
Runtime error
Runtime error
Commit
·
732bb40
1
Parent(s):
30b40e4
Add entrypoint script and update Dockerfile for container launch
Browse files- Dockerfile +15 -4
- entrypoint.sh +4 -0
- requirements.txt +1 -0
Dockerfile
CHANGED
|
@@ -19,12 +19,23 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 19 |
# Copy the rest of the application's code into the container at /app
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
EXPOSE 8000
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Define environment variable
|
| 26 |
-
ENV CHAINLIT_HOST=0.0.0.0
|
| 27 |
-
ENV CHAINLIT_PORT=8000
|
| 28 |
|
| 29 |
# Run app.py when the container launches
|
| 30 |
-
CMD ["chainlit", "run", "app.py"]
|
|
|
|
|
|
| 19 |
# Copy the rest of the application's code into the container at /app
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
+
# Copy and make entrypoint executable
|
| 23 |
+
COPY entrypoint.sh .
|
| 24 |
+
RUN chmod +x entrypoint.sh
|
| 25 |
+
|
| 26 |
+
# Make port 8000 available to the world outside this container (for local dev)
|
| 27 |
EXPOSE 8000
|
| 28 |
|
| 29 |
+
# Run the entrypoint script when the container launches
|
| 30 |
+
ENTRYPOINT ["./entrypoint.sh"]
|
| 31 |
+
|
| 32 |
+
# Make port 8000 available to the world outside this container
|
| 33 |
+
# EXPOSE 8000
|
| 34 |
+
|
| 35 |
# Define environment variable
|
| 36 |
+
# ENV CHAINLIT_HOST=0.0.0.0
|
| 37 |
+
# ENV CHAINLIT_PORT=8000
|
| 38 |
|
| 39 |
# Run app.py when the container launches
|
| 40 |
+
# CMD ["chainlit", "run", "app.py"]
|
| 41 |
+
# CMD chainlit run app.py --host 0.0.0.0 --port ${PORT:-8000} --headless
|
entrypoint.sh
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# This script runs the Chainlit app, binding to Render's dynamic PORT (falls back to 8000 locally)
|
| 3 |
+
|
| 4 |
+
exec chainlit run app.py --host 0.0.0.0 --port ${PORT:-8000} --headless
|
requirements.txt
CHANGED
|
@@ -15,3 +15,4 @@ langchain_nebius>=0.1.0
|
|
| 15 |
asyncpg>=0.29.0
|
| 16 |
ragas>=0.1.0
|
| 17 |
datasets>=2.0.0
|
|
|
|
|
|
| 15 |
asyncpg>=0.29.0
|
| 16 |
ragas>=0.1.0
|
| 17 |
datasets>=2.0.0
|
| 18 |
+
langchain-classic>=1.0.0
|