Spaces:
Runtime error
Runtime error
hereoncollab
commited on
Commit
•
ce385fb
1
Parent(s):
751924a
Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use a base image with Python and a lighter footprint
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV PYTHONUNBUFFERED=1 \
|
6 |
+
GRADIO_ALLOW_FLAGGING=never \
|
7 |
+
GRADIO_NUM_PORTS=1 \
|
8 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
9 |
+
GRADIO_THEME=huggingface \
|
10 |
+
SYSTEM=spaces
|
11 |
+
|
12 |
+
# Set the working directory
|
13 |
+
WORKDIR /code
|
14 |
+
|
15 |
+
# Copy the requirements file
|
16 |
+
COPY requirements.txt /code/requirements.txt
|
17 |
+
|
18 |
+
# Install dependencies
|
19 |
+
RUN pip install -U pip \
|
20 |
+
&& pip install -U Cython ninja \
|
21 |
+
&& pip install --no-cache-dir -r /code/requirements.txt
|
22 |
+
|
23 |
+
# Copy the rest of the application code
|
24 |
+
COPY . /code
|
25 |
+
|
26 |
+
# Set the command to run the application
|
27 |
+
CMD ["python", "app.py"]
|