Spaces:
Runtime error
Runtime error
Commit
·
cb18c46
1
Parent(s):
228cffb
Update Dockerfile
Browse files- .gitattributes +1 -0
- Dockerfile +15 -8
.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
CHANGED
@@ -1,8 +1,5 @@
|
|
1 |
# Use Python 3.11 slim image
|
2 |
-
FROM
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
|
7 |
|
8 |
RUN useradd -m -u 1000 user
|
@@ -19,12 +16,22 @@ RUN pip install poetry
|
|
19 |
|
20 |
WORKDIR /app
|
21 |
|
22 |
-
# Copy
|
23 |
-
COPY pyproject.toml poetry.lock* ./
|
24 |
|
25 |
# Install dependencies using Poetry
|
26 |
RUN poetry config virtualenvs.create false \
|
27 |
&& poetry install --no-dev --no-interaction --no-ansi
|
28 |
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Use Python 3.11 slim image
|
2 |
+
FROM biggates/poetry:2.0.1-py3.11-slim
|
|
|
|
|
|
|
3 |
|
4 |
|
5 |
RUN useradd -m -u 1000 user
|
|
|
16 |
|
17 |
WORKDIR /app
|
18 |
|
19 |
+
# Copy dependency files
|
20 |
+
COPY --chown=user pyproject.toml poetry.lock* ./
|
21 |
|
22 |
# Install dependencies using Poetry
|
23 |
RUN poetry config virtualenvs.create false \
|
24 |
&& poetry install --no-dev --no-interaction --no-ansi
|
25 |
|
26 |
+
# Copy application code
|
27 |
+
COPY --chown=user . .
|
28 |
+
|
29 |
+
# Set environment variables for HuggingFace Spaces
|
30 |
+
ENV PYTHONPATH=/app
|
31 |
+
ENV PORT=7860
|
32 |
+
|
33 |
+
# Expose the port Chainlit runs on
|
34 |
+
EXPOSE 7860
|
35 |
+
|
36 |
+
# Command to run the Chainlit app
|
37 |
+
CMD ["chainlit", "run", "src/app.py", "--host", "0.0.0.0", "--port", "7860"]
|