Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -3
Dockerfile
CHANGED
@@ -52,11 +52,16 @@ RUN wget https://seosnaps-00.hf.space/download/powershell.ps1 -O /app/pe/powersh
|
|
52 |
# Copy application files
|
53 |
COPY . .
|
54 |
|
55 |
-
#
|
56 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
# Expose the port the app runs on
|
59 |
EXPOSE 7860
|
60 |
|
61 |
# Command to run the Flask app
|
62 |
-
CMD ["
|
|
|
52 |
# Copy application files
|
53 |
COPY . .
|
54 |
|
55 |
+
# Set up a virtual environment and install Python dependencies
|
56 |
+
RUN python3 -m venv /app/venv && \
|
57 |
+
/app/venv/bin/pip install --no-cache-dir --upgrade pip && \
|
58 |
+
/app/venv/bin/pip install --no-cache-dir -r /app/requirements.txt
|
59 |
+
|
60 |
+
# Activate the virtual environment in the shell
|
61 |
+
ENV PATH="/app/venv/bin:$PATH"
|
62 |
|
63 |
# Expose the port the app runs on
|
64 |
EXPOSE 7860
|
65 |
|
66 |
# Command to run the Flask app
|
67 |
+
CMD ["python", "main.py"]
|