Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
@@ -5,9 +5,13 @@ FROM python:3.10.9
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
wkhtmltopdf \
|
7 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
8 |
# Set the working directory
|
9 |
WORKDIR /app
|
10 |
|
|
|
|
|
|
|
11 |
# Copy the current directory contents into the container
|
12 |
COPY . .
|
13 |
|
@@ -18,4 +22,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
18 |
RUN chmod -R a+w /usr/local/lib/python3.10/site-packages/hrequests/bin/
|
19 |
|
20 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
21 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
wkhtmltopdf \
|
7 |
&& rm -rf /var/lib/apt/lists/*
|
8 |
+
|
9 |
# Set the working directory
|
10 |
WORKDIR /app
|
11 |
|
12 |
+
# Create a temporary folder with write permissions
|
13 |
+
RUN mkdir /app/temp && chmod 777 /app/temp
|
14 |
+
|
15 |
# Copy the current directory contents into the container
|
16 |
COPY . .
|
17 |
|
|
|
22 |
RUN chmod -R a+w /usr/local/lib/python3.10/site-packages/hrequests/bin/
|
23 |
|
24 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
25 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|