Spaces:
Sleeping
Sleeping
Commit
·
28decc7
1
Parent(s):
e4309fa
Adjust dockerfile
Browse files- Dockerfile +6 -10
Dockerfile
CHANGED
|
@@ -7,21 +7,17 @@ WORKDIR /code
|
|
| 7 |
# Copy the pyproject.toml file into the container at /code
|
| 8 |
COPY ./pyproject.toml /code/pyproject.toml
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# Install the project and its dependencies using pyproject.toml
|
| 11 |
# --no-cache-dir: Disables the cache to keep image size down
|
| 12 |
# --upgrade pip: Ensures pip is up-to-date
|
| 13 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 14 |
-
pip install --no-cache-dir
|
| 15 |
|
| 16 |
-
# Copy the rest of the application code (the 'app' directory contents)
|
| 17 |
-
# into the container at /code/app
|
| 18 |
-
# Adjust if your Python code is not in an 'app' subfolder
|
| 19 |
-
COPY ./app /code/app
|
| 20 |
-
# If main.py is at the root with static/ and templates/
|
| 21 |
-
# COPY ./main.py /code/main.py
|
| 22 |
-
# COPY ./static /code/static
|
| 23 |
-
# COPY ./templates /code/templates
|
| 24 |
-
# Ensure your paths match your project structure. Assuming main.py is in 'app/'
|
| 25 |
|
| 26 |
# Make port 8000 available to the world outside this container
|
| 27 |
# Hugging Face Spaces expects the app to listen on port 7860 by default,
|
|
|
|
| 7 |
# Copy the pyproject.toml file into the container at /code
|
| 8 |
COPY ./pyproject.toml /code/pyproject.toml
|
| 9 |
|
| 10 |
+
# Copy the rest of the application code (the 'app' directory contents)
|
| 11 |
+
# into the container at /code/app
|
| 12 |
+
# Adjust if your Python code is not in an 'app' subfolder
|
| 13 |
+
COPY ./app /code/app
|
| 14 |
+
|
| 15 |
# Install the project and its dependencies using pyproject.toml
|
| 16 |
# --no-cache-dir: Disables the cache to keep image size down
|
| 17 |
# --upgrade pip: Ensures pip is up-to-date
|
| 18 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 19 |
+
pip install --no-cache-dir -e /code/app
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Make port 8000 available to the world outside this container
|
| 23 |
# Hugging Face Spaces expects the app to listen on port 7860 by default,
|