Spaces:
Sleeping
Sleeping
Prathamesh1420
commited on
Update Dockerfile
Browse files- Dockerfile +15 -28
Dockerfile
CHANGED
@@ -1,37 +1,24 @@
|
|
1 |
-
#
|
2 |
-
FROM python:3.9-slim
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
-
ENV PYTHONUNBUFFERED=1
|
7 |
|
8 |
-
#
|
9 |
WORKDIR /app
|
10 |
-
RUN mkdir -p /app/cache /app/app
|
11 |
-
|
12 |
-
# Copy requirements file into the container
|
13 |
-
COPY requirements.txt /app/
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
-
wget \
|
18 |
-
&& rm -rf /var/lib/apt/lists/*
|
19 |
|
20 |
-
# Install
|
21 |
-
RUN pip install --
|
22 |
-
RUN pip install -r /app/requirements.txt
|
23 |
|
24 |
-
#
|
25 |
-
|
26 |
|
27 |
-
#
|
28 |
-
# RUN pip install tensorflow
|
29 |
-
|
30 |
-
# Copy application code into the container
|
31 |
-
COPY . /app/app
|
32 |
-
|
33 |
-
# Expose the port Gradio will use
|
34 |
EXPOSE 7860
|
35 |
|
36 |
-
|
37 |
-
|
|
|
|
|
|
1 |
+
# Dockerfile
|
|
|
2 |
|
3 |
+
# Use the official Python image with the desired version
|
4 |
+
FROM python:3.9-slim
|
|
|
5 |
|
6 |
+
# Set the working directory inside the container
|
7 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
# Copy the requirements file to the working directory
|
10 |
+
COPY requirements.txt /app
|
|
|
|
|
11 |
|
12 |
+
# Install the dependencies
|
13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
14 |
|
15 |
+
# Copy the rest of the application code to the working directory
|
16 |
+
COPY app.py /app
|
17 |
|
18 |
+
# Expose the port that Gradio will run on (default is 7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
EXPOSE 7860
|
20 |
|
21 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
22 |
+
|
23 |
+
# Command to run your application
|
24 |
+
CMD ["python", "app.py"]
|