Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use a base image provided by Hugging Face Spaces for Gradio SDK
|
2 |
+
# Check HF docs for the latest recommended base image if needed
|
3 |
+
# FROM huggingface/python-dependencies:latest
|
4 |
+
FROM python:3.10-slim
|
5 |
+
|
6 |
+
# Set working directory
|
7 |
+
WORKDIR /code
|
8 |
+
|
9 |
+
# Copy requirements first to leverage Docker cache
|
10 |
+
COPY ./requirements.txt /code/requirements.txt
|
11 |
+
|
12 |
+
# Install Python dependencies
|
13 |
+
# Using --no-cache-dir can sometimes help in resource-constrained environments
|
14 |
+
RUN pip install --no-cache-dir --upgrade pip
|
15 |
+
RUN pip install --no-cache-dir -r /code/requirements.txt
|
16 |
+
|
17 |
+
# Copy the rest of the application code
|
18 |
+
COPY . /code/
|