Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -5
Dockerfile
CHANGED
@@ -7,6 +7,8 @@ RUN apt-get update && apt-get install -y \
|
|
7 |
git \
|
8 |
curl \
|
9 |
zip \
|
|
|
|
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
# Install Katana
|
@@ -16,18 +18,23 @@ RUN go install github.com/projectdiscovery/katana/cmd/katana@latest
|
|
16 |
ENV GOPATH=/go
|
17 |
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
# Copy the Gradio app code to the container
|
20 |
COPY app.py /app/app.py
|
21 |
|
22 |
# Set the working directory
|
23 |
WORKDIR /app
|
24 |
|
25 |
-
# Install Python dependencies
|
26 |
-
RUN apt-get update && apt-get install -y python3-pip
|
27 |
-
RUN pip3 install gradio requests
|
28 |
-
|
29 |
# Expose the port Gradio will run on
|
30 |
EXPOSE 7860
|
31 |
|
32 |
# Command to run the Gradio app
|
33 |
-
CMD ["
|
|
|
7 |
git \
|
8 |
curl \
|
9 |
zip \
|
10 |
+
python3 \
|
11 |
+
python3-venv \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Install Katana
|
|
|
18 |
ENV GOPATH=/go
|
19 |
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
20 |
|
21 |
+
# Create and activate a virtual environment for Python
|
22 |
+
RUN python3 -m venv /app/venv
|
23 |
+
ENV PATH="/app/venv/bin:$PATH"
|
24 |
+
|
25 |
+
# Install Python dependencies in the virtual environment
|
26 |
+
COPY requirements.txt /app/requirements.txt
|
27 |
+
RUN pip install --upgrade pip \
|
28 |
+
&& pip install -r /app/requirements.txt
|
29 |
+
|
30 |
# Copy the Gradio app code to the container
|
31 |
COPY app.py /app/app.py
|
32 |
|
33 |
# Set the working directory
|
34 |
WORKDIR /app
|
35 |
|
|
|
|
|
|
|
|
|
36 |
# Expose the port Gradio will run on
|
37 |
EXPOSE 7860
|
38 |
|
39 |
# Command to run the Gradio app
|
40 |
+
CMD ["python", "app.py"]
|