Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -8
Dockerfile
CHANGED
@@ -11,25 +11,22 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|
11 |
# Ensure Python output is sent straight to terminal without buffering
|
12 |
ENV PYTHONUNBUFFERED 1
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
# Copy the requirements file into the container at /code
|
15 |
COPY requirements.txt .
|
16 |
|
17 |
# Install any needed packages specified in requirements.txt
|
18 |
-
# --no-cache-dir reduces image size
|
19 |
-
# --upgrade ensures pip is the latest
|
20 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
21 |
|
22 |
# Copy the rest of the application code into the container at /code
|
23 |
COPY . /code
|
24 |
|
25 |
# Expose the port the app runs on
|
26 |
-
# Hugging Face Spaces typically uses 7860, but uvicorn defaults to 8000.
|
27 |
-
# Let's align with the common uvicorn default unless HF forces 7860.
|
28 |
-
# If using HF SDK set to FastAPI, it might expect 7860. If using Docker directly, 8000 is fine.
|
29 |
-
# Let's use 7860 for better compatibility with HF typical setups.
|
30 |
EXPOSE 7860
|
31 |
|
32 |
# Define the command to run the application
|
33 |
-
# Runs the Uvicorn server, listening on all interfaces (0.0.0.0)
|
34 |
-
# app:app means "in the file app.py, find the FastAPI instance named app"
|
35 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
11 |
# Ensure Python output is sent straight to terminal without buffering
|
12 |
ENV PYTHONUNBUFFERED 1
|
13 |
|
14 |
+
# ---> ADD THIS LINE <---
|
15 |
+
# Set a writable cache directory for Composio inside the working directory
|
16 |
+
ENV COMPOSIO_CACHE_DIR=/code/.composio
|
17 |
+
# ---> END OF ADDED LINE <---
|
18 |
+
|
19 |
# Copy the requirements file into the container at /code
|
20 |
COPY requirements.txt .
|
21 |
|
22 |
# Install any needed packages specified in requirements.txt
|
|
|
|
|
23 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
24 |
|
25 |
# Copy the rest of the application code into the container at /code
|
26 |
COPY . /code
|
27 |
|
28 |
# Expose the port the app runs on
|
|
|
|
|
|
|
|
|
29 |
EXPOSE 7860
|
30 |
|
31 |
# Define the command to run the application
|
|
|
|
|
32 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|