Spaces:
Build error
Build error
Fix 'source: not found' error by using '.' in Dockerfile and start.sh
Browse files- Dockerfile +2 -1
- start.sh +5 -5
Dockerfile
CHANGED
@@ -35,7 +35,8 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86
|
|
35 |
# --- NEW: Accept Conda Terms of Service for default channels ---
|
36 |
# This is required for non-interactive environments like Docker builds.
|
37 |
# We source conda.sh first to make the 'conda' command available in this RUN layer.
|
38 |
-
|
|
|
39 |
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
|
40 |
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
|
41 |
# --- END NEW ---
|
|
|
35 |
# --- NEW: Accept Conda Terms of Service for default channels ---
|
36 |
# This is required for non-interactive environments like Docker builds.
|
37 |
# We source conda.sh first to make the 'conda' command available in this RUN layer.
|
38 |
+
# We use '. ' (dot space) instead of 'source' as /bin/sh is the default shell.
|
39 |
+
RUN . $CONDA_DIR/etc/profile.d/conda.sh && \
|
40 |
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
|
41 |
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
|
42 |
# --- END NEW ---
|
start.sh
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#!/bin/bash
|
2 |
-
set -eux
|
3 |
|
4 |
export CUDA_VISIBLE_DEVICES="0"
|
5 |
export CUDA_HOME="/usr/local/cuda"
|
@@ -7,16 +7,16 @@ export CUDA_HOME="/usr/local/cuda"
|
|
7 |
echo "Activating Conda environment and starting server..."
|
8 |
|
9 |
# Activate the specific conda environment
|
10 |
-
#
|
11 |
-
|
12 |
conda activate cosmos-predict1 # Activate the environment
|
13 |
|
14 |
# Set PYTHONPATH after conda activation for your specific project modules
|
15 |
-
export PYTHONPATH="/app:/app/gui/api"
|
16 |
|
17 |
echo "Starting GEN3C FastAPI inference server..."
|
18 |
|
19 |
-
export GEN3C_CKPT_PATH="/app/checkpoints"
|
20 |
export GEN3C_GPU_COUNT=1
|
21 |
|
22 |
# Start the FastAPI server
|
|
|
1 |
#!/bin/bash
|
2 |
+
set -eux
|
3 |
|
4 |
export CUDA_VISIBLE_DEVICES="0"
|
5 |
export CUDA_HOME="/usr/local/cuda"
|
|
|
7 |
echo "Activating Conda environment and starting server..."
|
8 |
|
9 |
# Activate the specific conda environment
|
10 |
+
# Use '. ' (dot space) instead of 'source'
|
11 |
+
. $CONDA_DIR/etc/profile.d/conda.sh # Source the conda.sh for the shell
|
12 |
conda activate cosmos-predict1 # Activate the environment
|
13 |
|
14 |
# Set PYTHONPATH after conda activation for your specific project modules
|
15 |
+
export PYTHONPATH="/app:/app/gui/api"
|
16 |
|
17 |
echo "Starting GEN3C FastAPI inference server..."
|
18 |
|
19 |
+
export GEN3C_CKPT_PATH="/app/checkpoints"
|
20 |
export GEN3C_GPU_COUNT=1
|
21 |
|
22 |
# Start the FastAPI server
|